Closed huttarl closed 7 years ago
Thank you for the detailed bug report and the suggestions!
I'll take a look whether I could modify the code so that the @schematypens
attribute isn't required, and if not, I'll modify the documentation as you suggested.
Version 0.3.1 should fix the issue. Exalt now tries to auto-detect the schema type based on the file extension of the path in the @href
attribute.
It'll take a while to show up in Package Control, but when it does, could you please give it a go and let me know whether that fixes the issue for you? Thanks!
I thought I had replied here, but I don't see it so I'll comment again. Thank you for the quick fix! Version 0.3.1 is up on Package Control. SublimeText says I'm now running Exalt 0.3.1.
Unfortunately, when I type Cmd+Ctrl+V, I still see no response ... But now this is the case even when I have the schematypens attribute!
In other words, I used to see a validation message when the schematypens attribute is present, and not otherwise. Now I don't see a validation in either case.
And still, there's no error message when validation is not performed. So it's not even possible to be sure that I'm invoking validation correctly.
I closed the XML file and re-opened it. Now Exalt validation works correctly. I guess before, Exalt got (silently) updated after the XML file had been opened, so maybe the new code didn't run?
I guess before, Exalt got (silently) updated after the XML file had been opened, so maybe the new code didn't run?
That's very likely.
Just a clarification, though: do you mean that the issue has been fixed for good, or that you need to reopen the XML file every time before validation starts working?
It seems that this issue is resolved, so I'm closing it. If you have any further problems or questions, please feel free to add a comment here.
On Mac OS X, Sublime Text 3, with Exalt 0.3.0:
I installed Exalt, and opened an XML file that had the following xml-model PI:
<?xml-model href="msconfig.rng" ?>
The rng file was in the same folder as the XML file.
When I pressed Cmd+Ctrl+V, there was no response: no error, no change of the status bar (bottom of window), nothing. I tried this with the XML being well-formed, not-well-formed, valid, and invalid. No response.
Through experimentation, I found that it works if you include the schematypens attribute:
<?xml-model href="msconfig.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
Now I get a "Valid XML" message, or a validation error message, whenever I save or press Ctrl+Cmd+V.
The docs do say to use a "processing instruction like this", and show an example that includes the
schematypens
attribute, but the docs are not specific about whether that attribute is required. My processing instruction is not "like this" in various ways (e.g. the structure of the href path), but apparently those ways don't matter, except for theschematypens
attribute. That attribute is not required in the W3C standards that the docs link to, so it's not obvious that it would be required by Exalt.Recommendations:
schematypens
attribute), and doesn't find what it requires, output a message saying what it needs. With no output at all, the user is left wondering whether Exalt is just not installed correctly, or it doesn't support RelaxNG validation, or ... who knows.schematypens
attribute is required. The less guesswork the user has to do, the more likely he will be to successfully begin using this tool vs. moving on to look for another one.Thanks for a useful tool. The availability of Exalt makes it more likely that my co-workers who are editing copies of an XML config file will validate their work.