Class ErrorReporterToListener

  • All Implemented Interfaces:
    ErrorReporter

    public class ErrorReporterToListener
    extends java.lang.Object
    implements ErrorReporter
    A bridging class that allows errors in an XSLT Transformation, or in a Query, to be reported to a JAXP ErrorListener.

    Warning conditions that do not prevent execution of the stylesheet or query are reported to the ErrorListener.warning(TransformerException) method.

    Error conditions that do prevent execution of the stylesheet or query are reported to the ErrorListener.fatalError(TransformerException) method.

    The ErrorListener.error(TransformerException) method is never called, because the concept of "recoverable errors" is no longer present in the XSLT specification.

    Since:
    10.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorReporterToListener​(javax.xml.transform.ErrorListener listener)
      Create an error reporter that wraps a JAXP ErrorListener
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.transform.ErrorListener getErrorListener()
      Get the JAXP ErrorListener wrapped by this error reporter
      void report​(XmlProcessingError error)
      Receive notification of a error or warning
      • Methods inherited from class java.lang.Object

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

      • ErrorReporterToListener

        public ErrorReporterToListener​(javax.xml.transform.ErrorListener listener)
        Create an error reporter that wraps a JAXP ErrorListener
        Parameters:
        listener - the wrapped ErrorListener. Must not be null.
    • Method Detail

      • getErrorListener

        public javax.xml.transform.ErrorListener getErrorListener()
        Get the JAXP ErrorListener wrapped by this error reporter
        Returns:
        the wrapped ErrorListener
      • report

        public void report​(XmlProcessingError error)
        Receive notification of a error or warning
        Specified by:
        report in interface ErrorReporter
        Parameters:
        error - information about the error or warning