DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27522

Xalan interpretive doesn't produce ContentHandler.startDocument before and 
LexicalHandler.startComment when stylesheet is written to produce a comment before 
root element

           Summary: Xalan interpretive doesn't produce
                    ContentHandler.startDocument before and
                    LexicalHandler.startComment when stylesheet is written
                    to produce a comment before root element
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.serialize
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Apparently, when the stylesheet is written to produce a comment before the root 
element, Xalan interpretive fires off a LexicalHandler.comment callback before
it calls the  ContentHandler.startDocument callback.

 This is in violation of the SAX contract. The bug is found by 
 Kohsuke ( [EMAIL PROTECTED] ) 

See the attachment for the test case.  Run it as:
"java XSLT test.xsl test.xsl"

 ( You have to extract the attached XSLT.tar and then put bin
   directory in CLASSPATH )

Regards
-Ramesh

Reply via email to