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=14539>.
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=14539

startDocument can be called twice by TransformerIdentityImpl

           Summary: startDocument can be called twice by
                    TransformerIdentityImpl
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.transformer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If you have a XML like this:

<?xml version="1.0" encoding="UTF-8"?>
<!-- comments -->
<ROOT/>

the startDocument of the ContentHandler is called 2 times if you use the 
transformer for the first time.

in org.apache.xalan.transformer.TransformerIdentityImpl, two ways to resolve it:
1) initialize m_flushedStartDoc to true.
2) remove flushStartDoc() function and call directly the startDocument
().startDocument() from the startDocument() method.

I think that the second way is better because flushStartDoc() don't add any 
value.
I attach a diff file for the second solution.

Reply via email to