microsoft / XmlNotepad

XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents.

Home Page:https://microsoft.github.io/XmlNotepad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"XML Reload" removes loaded XSLT

Pierre-de-la-Verre opened this issue · comments

To reproduce:

  • I'm working with "mydata.xml". It is modified with an external software again and again.
  • open mydata.xml with XmlNotepad, go to "XSL Output" and open "mytransform.xslt"
  • Push "Transform" and get some output
  • Modify "mydata.xml" in the other software and save it
  • XmlNotepad rports: "File has changed - do you want to reload?"
  • Press "Yes" - mydata.xml is reloaded ..
  • -->> The connection to "mytransform.xslt" is lost, I have to select it again and again when the XML is reloaded.

Could you modify this behaviour to keep the connection between XML and XSLT alive?

Ah, sounds like a great idea, so if you are on the XSLT transform tab and the XML file changes, and the user clicks Reload, then automatically rerun the transform. Is this what you want?

Good question ..

I would say: the base feature should be to not! lose the connection to the XSL.

The "rerun/reload" topic can be seen in a complex way:
3 situations (XML has changed / XSL has changed / XML and XSL has changed) can be answered in
2 ways (reload / rerun) in
3 modes (ask always / do it always / don't do it)

Maybe some "possible combinations" are useless, but at the moment I don't have an idea which combinations are useful and how to handle it. But I think that's not the highest priority ;-)

Got it so how about we add to the Options dialog

  • Auto-reload XML
  • Auto-reload XSLT

Where the property has a drop down with 3 values [Always, Prompt, Never], where the behavior we see today is [Prompt] for XML and [Never] for XSL. If you change it to [Always], [Always] you get the fully "live" reload behavior (which is what VS code does). Maybe the status bar will tell you that a reload happened.

Could also play with:

  • Auto-reload XSD

For me this would be fine, but I'm always hoping for some comments of other users.