XML Tools syntax check
-
Dear Community,
I was hoping somebody was able to help me with some difficulties I have with using the “Check XML syntax now”-feature in the XML Tools plugin. I am working on a xml-file that, eventually, will be in a xml format called DTBook. Not sure if it is considered “big” in this community, with 16000 lines. When I hit the “Check XML syntax now”-button, this is what I get:
There is no “End tag strong” in the referred line (and if there was, why would it be better to close a level4 in the middel of a level5?)
I realize that this check is about well formed xml, and not a validation against the DTD, but if it is too loose accepting nesting of tags, it seems a bit of a waste of time. Is there a way of skiping the syntax check, and go straight to the validation? Or is this a bug or some combability issue?
Notepad++ v8.4.2 (64-bit)
Build time : May 29 2022 - 16:47:30
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : $COMMAND_LINE_PLACEHOLDER$
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 11 (64-bit)
OS Version : 21H2
OS Build : 22000.739
Current ANSI codepage : 1252
Plugins :
mimeTools (2.8)
NppConverter (4.4)
NppExport (0.4)
XMLTools (3.1.1.13) -
I can’t answer your question about validation without prior error checking, but from a programmer’s point of view it doesn’t make much sense. If the MSXML engine reports an error, it is likely that there is an error. I would imagine that the plugin is not displaying the correct line because you are using word wrapping. If you disable word wrapping, does it still point to a non-existent strong tag? Can you provide the xml file?
-
@ekopalypse
Thanks for your response!
I’m not a programmer, so I’ll have to accept that a validation without a prior syntax check makes no sense from a programmer’s point of view. It is just that from a tech novice’s understanding, when a document may be well formed but not valid, but not the other way around (not with the DTD I use, at least), the validation would also include syntax check. I have most of my xml experience from Oxygen, and there a validation prosess can be started on a not well-formed xml document - the upside is that the validation points to elements not allowed according to the DTD, not just “corresponding tags opening and closing”. But how this is solved, under the hood, I don’t know.There is without doubt errors in my document, and I eventually found the incident the error message referenced to, it was a strong closing tag misplaced, immediately after a level4 opening tag. Only it was not line 1820, but on line 1788.
Disabling word wrapping did not make any difference: the error below I found to be on line 3521.
-
@mats-køber ,
That’s the first thing to suspect when you get a message like that, that the line number noted isn’t necessarily the problem line. It usually means, that the line that the checker shows, is where it finally realized there was an error somewhere prior and choked trying to figure it out. :-)
Good job finding it. In your case, it sounds like it did a prescan and then choked later down the file when trying to implement it.