http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2089

*** shadow/2089 Fri Jun  8 18:33:41 2001
--- shadow/2089.tmp.22389       Fri Jun  8 18:33:41 2001
***************
*** 0 ****
--- 1,52 ----
+ +============================================================================+
+ | xsl:comment output inside xalan:write appears in original document         |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2089                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.1                   |
+ |   Resolution:                            Platform: Sun                     |
+ |     Severity: Major                    OS/Version: Solaris                 |
+ |     Priority: Other                     Component: org.apache.xalan.lib.Re |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                         |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ I used xalan:write to write content to a new file.
+ This works fine but xsl:comment output appears in the parent file.
+ 
+ If I run any XML file through the write_comments.xsl stylesheet below using 
+ java org.apache.xalan.xslt.Process -in  junk.xml -xsl write_comments.xsl -out
+ mainfile.html, the nested comment
+   <!--This is a comment in the new file "written_out.html".-->
+ appears in mainfile.html, not the sub-file I'm writing.  (Instant Saxon 6.0.2's
+ saxon:output puts the xsl:comment in the sub-file as I would expect.)
+ 
+ - - - - cut here - - - -
+ 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!--
+     BUG: Using <xalan:write>, <xsl:comment> still appears in the main document.
+ -->
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+ <xsl:template match="/">
+     <p 
+         xmlns:xalan="org.apache.xalan.xslt.extensions.Redirect"
+         xsl:extension-element-prefixes="xalan"
+     >
+         Hello from the main file.
+         <xsl:comment>This is a comment in the main file.</xsl:comment>
+         <xalan:write file="written_out.html">
+             We are in xalan:write.
+             This should be in the new file "written_out.html".
+             <xsl:comment>This is a comment in the new file
+ "written_out.html".</xsl:comment>
+             <xsl:fallback>
+                 We are in fallback for xalan:write
+             </xsl:fallback>
+         </xalan:write>
+     </p>
+ </xsl:template>
+ </xsl:stylesheet>
\ No newline at end of file

Reply via email to