How can I get the Xerces 2 (1.1.4) DOM parser to validate against a local DTD?
When I run my basic test app, it does not throw any exceptions when running through an xml that contains elements not described in the DTD, therefore no validation is occuring.
To be sure, I renamed/moved the DTD, which threw an exception on debug when parsing, proving the DTD was originally being loaded) code snippet: I did recall using set Validating(boolean) method on an older DOM parser implementation (XML4J, I think).
I didn't find anything equivalent to it in Xerces 1.1.4 Thanks in advance.
I can provide a stylesheet and source XML if necessary, but I thought I would start at a higher level first before we get deeper.
Perhaps there is a reason in the Saxon implementation or in the spec that this scenario of validating during transformation vs.
When the HL7 XML Validation Engine, the opening screen scene at right is displayed.
(Without, of course, the red and yellow annotations that are superimposed here.) The display is a standard Windows dialog, with a title bar and menus at top; a textual overview of the application the middle; entry boxes for the target files and target schemas; and execution buttons at bottom right.
(Note that the DTD is structured properly and is successfully loaded by the XML file being parsed.objects, are configured by setting features and properties. This allows just a handful of standard methods to support an arbitrary number of standard and non-standard features and properties of various types. Both features and properties are named by absolute URIs.I run a source document through a transformation which has xsl:validation="strict" on the root element of the output XML, I get the following 4 error messages: But when I run the same transformation WITHOUT the xsl:validation="strict" present, and then validate the transformed output XML afterwards (using an XMLReader), I get the following 10 error messages (which is closer to what I expect to see): Should I expect roughly the same messages to be produced during the transformation validation of the output vs. I am not expecting the text to match exactly, but I was expecting to see basically the same errors caught.Notice, for example, that none of the ID related errors were caught when validating during transformation.