Project

Profile

Help

Bug #4099

closed

Possible two small bugs in the handling of ErrorListener

Added by Gerben Abbink over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JAXP Java API
Sprint/Milestone:
-
Start date:
2019-01-16
Due date:
% Done:

100%

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

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

SaxonTester.java (2.63 KB) SaxonTester.java Gerben Abbink, 2019-01-16 20:43
SaxonTester.xml (194 Bytes) SaxonTester.xml Gerben Abbink, 2019-01-16 20:43
SaxonTester.xsd (206 Bytes) SaxonTester.xsd Gerben Abbink, 2019-01-16 20:43

Please register to edit this issue

Also available in: Atom PDF