Project

Profile

Help

Bug #5953

closed

JAXP ValidatorHandler throws an exception if the document is invalid

Added by Michael Kay over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JAXP Java API
Sprint/Milestone:
-
Start date:
2023-04-03
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
Java

Description

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

Also available in: Atom PDF