Project

Profile

Help

Bug #2516

closed

Schema validation: Fatal errors handled differently

Added by O'Neil Delpratt over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2015-12-01
Due date:
% Done:

100%

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

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

MyErrorListener.zip (695 Bytes) MyErrorListener.zip Yitzhak Khabinsky, 2015-12-01 19:44
Actions #1

Updated by Michael Kay over 8 years ago

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.

Actions #2

Updated by Yitzhak Khabinsky over 8 years ago

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:

  1. errorCount = error events + fatalError events

  2. warningCount = warning events

Actions #3

Updated by O'Neil Delpratt over 8 years ago

  • 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.

Actions #4

Updated by O'Neil Delpratt over 8 years ago

  • Applies to branch 9.7 added
  • Fix Committed on Branch 9.7 added
Actions #5

Updated by O'Neil Delpratt over 8 years ago

  • % 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

Actions #6

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF