Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2134

JAXP 1.3: Fix error handling behavior

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 2.7
    • JAXP
    • None
    • PatchAvailable

    Description

      Taken from the JAXP 1.3 javadocs on the javax.xml.transform package:

      The ErrorListener on both objects will always be valid and non-null, whether set by the application or a default implementation provided by the processor. The default implementation provided by the processor will report all warnings and errors to System.err and does not throw any Exceptions. Applications are strongly encouraged to register and use ErrorListeners that insure proper behavior for warnings and errors.

      The current ErrorListener implementations in Xalan interpretive and XSLTC do not completely conform to the spec. The default ErrorListener implementation in Xalan interpretive
      throws exceptions on errors and fatal errors. This causes a failure in the JAXP 1.3 TCK (testcase ErrorListener.error001). XSLTC also has its own problems on error handling. For example, it reports a warning by calling the ErrorListener.error() method.

      This is not something new in JAXP 1.3. I believe that JAXP 1.2 also has the same requirement. However, the JAXP 1.3 javadocs make it clearer that the default ErrorListener implementation should not throw exceptions.

      Attachments

        1. error_handling.patch
          8 kB
          Morris Kwan

        Activity

          People

            mkwan@ca.ibm.com Morris Kwan
            mkwan@ca.ibm.com Morris Kwan
            Ilene Seelemann Ilene Seelemann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: