DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24220>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24220 DocumentFragment returned by extension element cause multiple SAX endDocument() events Summary: DocumentFragment returned by extension element cause multiple SAX endDocument() events Product: XalanJ2 Version: CurrentCVS Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.extensions AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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
