You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/08/29 01:30:40 UTC

DO NOT REPLY [Bug 22808] New: - xsl:copy doesn't copy namespace nodes

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

xsl:copy doesn't copy namespace nodes

           Summary: xsl:copy doesn't copy namespace nodes
           Product: XalanJ2
           Version: CurrentCVS
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan-Xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: adrian@ephox.com


Using XSLTC from XAlan 2.5.1 and from the current CVS HEAD, xsl:copy doesn't 
automatically copy namespace nodes as http://www.w3.org/TR/xslt#copying 
indicates it should.  The simplest test case for this is the identity transform 
from that URL with a couple of additions (the xsl:preserve-space and strip-
space nodes):
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:strip-space elements="*"/>
<xsl:preserve-space elements="xhtml:*" 
xmlns:xsl="http://www.w3.org/1999/xhtml"/>

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>
</xsl:stylesheet>

If we run that stylesheet over itself, the xmlns:xhtml is lost resulting in an 
invalid stylesheet being output.  I ran this with using the 
org.apache.xalan.xsltc.cmdline.Compile and Transform classes from the command 
line using Java 1.3.1 on Mac OS X 10.2 with the xercesImpl.jar that's included 
in CVS.