Project

Profile

Help

QuickValidator Java Example only logs validation errors

Added by Holger Ostermann over 7 years ago

Dear all,

The QuickValidator Java example only logs validation errors, but does not throw an exception when used with saxon9ee.jar: Validation error on line 1183 column 15 of test3.xml: FORG0001: The content ... Also ContentHandler contentHandler or setErrorListener do not seem to get notified of validation errors. Therefore, validation errors cannot be tracked. If the input xml file is missing, the error is reported.

Best regards,

Holger Ostermann


Replies (1)

RE: QuickValidator Java Example only logs validation errors - Added by Michael Kay over 7 years ago

Well, it's only an example....

In practice I find that people have very different expectations / requirements as to how validation errors should be handled by an application (how they should be notified, and whether they should cause the application to "fail").

This example is explicitly showing the use of the option FeatureKeys.VALIDATION_WARNINGS which causes validation errors to be treated as non-fatal, which is what some people want.

    (1-1/1)

    Please register to reply