XalanJ2
  1. XalanJ2
  2. XALANJ-1706

[PATCH] DocumentFragment returned by extension element causes multiple SAX endDocument() events

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7.1
    • Component/s: Other
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      At Krysalis Barcode (http://www.krysalis.org/barcode) I have a Xalan extension
      which creates barcodes in SVG format [1]. Until recently I've used an
      extension function for that. As I was able to create an extension element for
      SAXON I wanted to do the same for the Xalan-extension. But here's the problem:

      The extension element (like the extension function where it works correctly)
      returns a DocumentFragment containing the generated barcode in SVG format. In
      the case of the extension element the DocumentFragment is processed by a
      TreeWalker which issues start/endDocument() SAX events although it shouldn't
      IMO. This behaviour causes Apache FOP to crash with an NPE because more than
      one endDocument() SAX event is sent to FOP by Xalan.

      I will attach a test case for the bugzilla test directory. Current CVS (HEAD)
      and 2.5.1 fail in this test. I will try to find a bugfix but if someone more
      intimate with the code beats me to it, so much better.

      [1] http://cvs.sourceforge.net/viewcvs.py/krysalis/krysalis-
      barcode/src/java/org/krysalis/barcode/xalan/BarcodeExt.java

      1. BugzillaExtElemSAXendDocumentCheck.zip
        4 kB
        Jeremias Maerki
      2. XALANJ-1706-patch.diff
        2 kB
        Jeremias Maerki
      3. ASF.LICENSE.NOT.GRANTED--endDocumentPatch.diff
        2 kB
        Jeremias Maerki
      4. ASF.LICENSE.NOT.GRANTED--BugzillaExtElemSAXendDocumentCheck.zip
        4 kB
        Jeremias Maerki

        Activity

        Jeremias Maerki created issue -
        Serge Knystautas made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 24220 26615
        Henry Zongaro made changes -
        Priority Major [ 3 ]
        Brian Minchau made changes -
        Assignee Xalan Developers Mailing List [ xalan-dev@xml.apache.org ] Brian Minchau [ minchau@ca.ibm.com ]
        Jeremias Maerki made changes -
        Attachment XALANJ-1706-patch.diff [ 12315006 ]
        Attachment BugzillaExtElemSAXendDocumentCheck.zip [ 12315007 ]
        Brian Minchau made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s Latest Development Code [ 10863 ]
        Brian Minchau made changes -
        Affects Version/s 2.7.1 [ 10863 ]
        Affects Version/s 2.7 [ 11080 ]
        Brian Minchau made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 36610 ] Default workflow, editable Closed status [ 12571207 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12571207 ] jira [ 12594979 ]

          People

          • Assignee:
            Brian Minchau
            Reporter:
            Jeremias Maerki
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development