Project

Profile

Help

Schema validation w JAXP: Error classificatio

Added by Anonymous about 15 years ago

Legacy ID: #7060110 Legacy Poster: Wouter Cordewiner (wcordewiner)

From http://www.saxonica.com/documentation/schema-processing/validation-api/schema-jaxp.html you can set a ErrorListener to control error messages. The ErrorListener interface distinguishes between 3 types of errors: warning, error and fatal error. I have two questions on this: 1) Can the validation process throw any of these errors or for example does it never throw warnings? 2) Does the validation process always throw ValidationException instances? My questions assume that it applies to the current version(s) of Saxon and things can, and probably will, change over time. Thank you, Wouter


Replies (2)

RE: Schema validation w JAXP: Error classificatio - Added by Anonymous about 15 years ago

Legacy ID: #7060564 Legacy Poster: Michael Kay (mhkay)

There are a few cases where the validation process reports a warning. The only ones I can find on a quick scan are: (a) If evaluation of an assertion fails with an XPath error. This is defined to be equivalent to the assertion returning false, but we report a warning first. (Note that an assertion returning false is not necessarily a validation error, for example if it occurs when testing one member of a union.) (b) If a schema document referenced in xsi:schemaLocation cannot be located There are also a few places where fatalError() is called within the com.saxonica.validate package - at a quick glance, I can't really see why.

RE: Schema validation w JAXP: Error classificatio - Added by Anonymous about 15 years ago

Legacy ID: #7060573 Legacy Poster: Michael Kay (mhkay)

>Does the validation process always throw ValidationException instances? That's the intent, but I'm not sure I would guarantee it. Michael Kay http://www.saxonica.com/

    (1-2/2)

    Please register to reply