Bug #4099
closed
Possible two small bugs in the handling of ErrorListener
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Description
I have uploaded a small test program, an xml file and an xsd file to show two possible bugs in the way Saxon handles ErrorListener.
1 - Warning are always written to stderr/stdout even if there's an ErrorListener registered. Errors are not written to stderr/stdout if there's an ErrorListener registered. Is this by design or is this a bug?
2 - SchemaValidator does not stop if i throw a TransformerException in MyErrorListener.error(). This is not according to the specs of ErrorListener:
https://docs.oracle.com/javase/9/docs/api/javax/xml/transform/ErrorListener.html#error(javax.xml.transform.TransformerException)
It says: TransformerException - if the application chooses to discontinue the transformation.
If this is also by design, how do i restrict the number of errors reported?
Files
-
Need to ensure that the SchemaCompiler used to process a schema referenced by xsi:schemaLocation
inherits the ErrorListener of the validation run rather than creating a new one. This is complicated by the fact that the primary reporting mechanism for a validator is now the InvalidityHandler, with delegation to a JAXP ErrorListener occurring only for compatibility reasons; but the ErrorListener is still primary for a SchemaCompiler.
-
Need to change InvalidityHandlerWrappingErrorListener so that an exception returned by the underlying ErrorListener is passed on.
- Category set to JAXP Java API
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Applies to branch trunk added
- Fix Committed on Branch 9.9, trunk added
Fixes committed on 9.9 branch and trunk.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.9.1.2 added
Bug issue fixed in the Saxon 9.9.1.2 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF