JAXP ValidatorHandler throws an exception if the document is invalid
It appears that Saxon's implementation of the JAXP ValidatorHandler interface throws an exception if the document is found to be invalid. The API specification is silent on the point, but it appears this is not the intended behaviour, and it's not the way the Xerces implementation works.
The difference is noted in a comment in the sample application SchemaValidatorHandlerExample, which as far as I can see is our only test case for this API.
Reported by a user on support email. In the use case in question, the ValidatorHandler is being invoked from a JAXP marshaller, and in this situation compatible behaviour with Xerces is essential to make this work.
Please register to edit this issue