Line Number Issue while executing Validating against a DTD.
Added by Sathya Selva almost 4 years ago
Dear Team. While Executing the Command line or java application I got the same result. But the result containing invalid line number. I tried with licensed version and also non licensed version.
Original Error in XML :
Line 995, Column 492: reference to non-existent ID “other”
Saxon Producing Error:
Recoverable error on line 8372 column 11 of Source.xml:
SXXP0003: Error reported by XML parser: An element with the identifier “other” must appear
in the document.
Query processing failed: The XML parser reported one validation error
Is this really Error or my misunderstanding, please give some suggestion.
Thanks and regards, Sathya
Replies (1)
RE: Line Number Issue while executing Validating against a DTD. - Added by Michael Kay almost 4 years ago
Saxon is merely reporting what comes back from the XML parser.
Presumably the second parser is keeping a list of unresolved ID references, and if the list is non-empty when it reaches the end of the document, then it reports the error then. But it doesn't remember where the references occurred, so the error message can't give you a more specific location.
Saxon works with multiple XML parsers and the quality of the diagnostics will vary. For someone designing an XML parser, it's an interesting example where there's a clear design trade-off between performance and quality of diagnostics.
Please register to reply