Class ValidatorImpl.InvalidityHandlerWrappingErrorHandler

  • All Implemented Interfaces:
    InvalidityHandler
    Enclosing class:
    ValidatorImpl

    public static class ValidatorImpl.InvalidityHandlerWrappingErrorHandler
    extends java.lang.Object
    implements InvalidityHandler
    Interface for reporting validation errors found during validation of an instance document against a schema.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Sequence endReporting()
      Get the value to be associated with a validation exception.
      org.xml.sax.ErrorHandler getErrorHandler()  
      void reportInvalidity​(Invalidity failure)
      Report a validation error found during validation of an instance document against a schema
      void startReporting​(java.lang.String systemId)
      At the start of a validation episode, initialize the handler
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InvalidityHandlerWrappingErrorHandler

        public InvalidityHandlerWrappingErrorHandler​(org.xml.sax.ErrorHandler handler)
    • Method Detail

      • startReporting

        public void startReporting​(java.lang.String systemId)
                            throws XPathException
        At the start of a validation episode, initialize the handler
        Specified by:
        startReporting in interface InvalidityHandler
        Parameters:
        systemId - optional; may be used to represent the destination of any report produced
        Throws:
        XPathException - if initialization of the invalidity handler fails for any reason
      • reportInvalidity

        public void reportInvalidity​(Invalidity failure)
                              throws XPathException
        Description copied from interface: InvalidityHandler
        Report a validation error found during validation of an instance document against a schema
        Specified by:
        reportInvalidity in interface InvalidityHandler
        Parameters:
        failure - details of the validation error
        Throws:
        XPathException - - if the validation error cannot be reported. This is fatal and will cause the validation run to be abandoned
      • getErrorHandler

        public org.xml.sax.ErrorHandler getErrorHandler()
      • endReporting

        public Sequence endReporting()
        Get the value to be associated with a validation exception. May return null. In the case of the InvalidityReportGenerator, this returns the XML document containing the validation report
        Specified by:
        endReporting in interface InvalidityHandler
        Returns:
        a value (or null). This will be the value returned as the value of the variable $err:value during try/catch processing