Bug #2516
closed
Schema validation: Fatal errors handled differently
Category:
Schema-Aware processing
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Description
Reported by user:
Fatal errors are handled differently. They are not counted toward validity of the input XML file.
Attached FatalErrors.zip file has this test case.
Files
The InvalidityHandlerWrappingErrorListener is calling ErrorListener.error() rather than ErrorListener.fatalError(). I'm not sure this is what we did before but it seems a better fit to the spec. It's difficult to be definitive because the spec for ErrorListener talks about its use for transformation rather than for validation.
To pinpoint your attention:
I attached my latest version of the MyErrorListener.java file.
Long time ago I added line 48 to add fatal errors to the global error counter.
This way we have 2 global counters:
-
errorCount = error events + fatalError events
-
warningCount = warning events
- Status changed from New to Resolved
For the purpose of background compatibility the class InvalidityHandlerWrappingErrorListener wraps an ErrorListener to use with the new Reporting feature. In 9.6 the errorListener was reported using the fatalErrors method. This we should have carried forward in 9.7 instead of using the 'errors' method.
Bug fixed and committed to svn.
- Applies to branch 9.7 added
- Fix Committed on Branch 9.7 added
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.2 added
Bug fix applied in the Saxon 9.7.0.2 maintenance release
- Status changed from Resolved to Closed
Please register to edit this issue
Also available in: Atom
PDF