public interface InvalidityHandler
|Modifier and Type||Method and Description|
At the end of a validation episode, do any closedown actions, and optionally return information collected in the course of validation (for example a list of error messages).
Report a validation error found during validation of an instance document against a schema
At the start of a validation episode, initialize the handler
void startReporting(java.lang.String systemId) throws XPathException
systemId- This will typically be the
systemIdproperty of the
Sourceobject representing the instance document being validated. In cases where the validation applies to something other than a Source object (for example, in-situ validation of a DOM tree, or XSLT-invoked validation of a result document), or where the
Sourceobject has no
SystemIdproperty, then it may either be null, or may be some other URI associated with the document.
XPathException- if initialization of the invalidity handler fails for any reason
void reportInvalidity(Invalidity failure) throws XPathException
failure- details of the validation error
XPathException- - if the validation error cannot be reported. This is fatal and will cause the validation run to be abandoned
Sequence endReporting() throws XPathException
InvalidityReportGenerator, this returns the XML document containing the validation report. This will be the value returned as the value of the variable $err:value during try/catch processing
XPathException- if an error occurs creating any validation report
Copyright (c) 2004-2021 Saxonica Limited. All rights reserved.