Issue Details (XML | Word | Printable)

Key: XALANJ-1706
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Brian Minchau
Reporter: Jeremias Maerki
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XalanJ2

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

Created: 29/Oct/03 11:01 PM   Updated: 12/Dec/07 07:14 AM
Return to search
Component/s: Other
Affects Version/s: 2.7
Fix Version/s: 2.7.1

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works BugzillaExtElemSAXendDocumentCheck.zip 2005-10-21 06:29 AM Jeremias Maerki 4 kB
Zip Archive BugzillaExtElemSAXendDocumentCheck.zip 2003-10-29 11:03 PM Jeremias Maerki 4 kB
Text File endDocumentPatch.diff 2004-08-26 03:24 AM Jeremias Maerki 2 kB
File Licensed for inclusion in ASF works XALANJ-1706-patch.diff 2005-10-21 06:29 AM Jeremias Maerki 2 kB
Environment:
Operating System: All
Platform: All

Bugzilla Id: 24220
Resolution Date: 22/Oct/05 11:48 AM


 Description  « Hide
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

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Serge Knystautas made changes - 02/Sep/04 09:54 PM
Field Original Value New Value
issue.field.bugzillaimportkey 24220 26615
Henry Zongaro made changes - 16/Dec/04 04:06 PM
Priority Major [ 3 ]
Brian Minchau made changes - 21/Oct/05 04:46 AM
Assignee Xalan Developers Mailing List [ xalan-dev@xml.apache.org ] Brian Minchau [ minchau@ca.ibm.com ]
Jeremias Maerki made changes - 21/Oct/05 06:29 AM
Attachment XALANJ-1706-patch.diff [ 12315006 ]
Attachment BugzillaExtElemSAXendDocumentCheck.zip [ 12315007 ]
Brian Minchau made changes - 22/Oct/05 11:48 AM
Fix Version/s Latest Development Code [ 10863 ]
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Brian Minchau made changes - 11/Dec/07 04:33 PM
Affects Version/s 2.7.1 [ 10863 ]
Affects Version/s 2.7 [ 11080 ]
Brian Minchau made changes - 12/Dec/07 07:14 AM
Status Resolved [ 5 ] Closed [ 6 ]