Class ErrorReporterToListener

java.lang.Object
net.sf.saxon.lib.ErrorReporterToListener
All Implemented Interfaces:
ErrorReporter

public class ErrorReporterToListener extends 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 Details

    • ErrorReporterToListener

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

    • getErrorListener

      public 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