http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2162 *** shadow/2162 Wed Jun 13 14:49:30 2001 --- shadow/2162.tmp.17255 Wed Jun 13 14:49:30 2001 *************** *** 0 **** --- 1,82 ---- + +============================================================================+ + | not outputting namespace nodes with <xsl:copy-of../> and <xsl:copy.../> el | + +----------------------------------------------------------------------------+ + | Bug #: 2162 Product: XalanJ2 | + | Status: NEW Version: 2.0.1 | + | Resolution: Platform: All | + | Severity: Normal OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + XSLTC has problems with the <xsl:copy-of../> and <xsl:copy.../> elements and + namespaces. It fails to copy declarations for the XSL namespace (as declared in + the stylesheet). + + Conformance test "namespace20" demonstrates this problem. + + XSL file + ================================================ + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:ped="ped.com" + xmlns:bdd="bdd.com" + xmlns="bubba.com" + exclude-result-prefixes="ped #default"> + + <!-- FileName: namespace20 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 7.1.1 Literal Result Elements --> + <!-- Creator: Paul Dick --> + <!-- Purpose: Test exclude-result-prefixes. --> + + <xsl:template match="doc"> + <out><xsl:text>
</xsl:text> + <xsl:for-each + select='document("")//ped:test'><xsl:copy/><xsl:text>
</xsl:text></xsl:for-each> + <xsl:for-each + select='document("")//bdd:test'><xsl:copy/><xsl:text>
</xsl:text></xsl:for-each> + <test>Test5</test> + <test xmlns="missing.com">Test6</test><xsl:text>
</xsl:text> + </out> + </xsl:template> + + <ped:test>Test1</ped:test> + <test xmlns="ped.com">Test2</test> + <ped:test xmlns:ped="ped2.com">Test3</ped:test> + <bdd:test>Test4</bdd:test> + + </xsl:stylesheet> + + XML file + ================================================ + <?xml version="1.0" encoding="ISO-8859-1"?> + <doc> + boo + </doc> + + Obtained Output + ================================================ + <?xml version="1.0" encoding="utf-8" ?> + <out xmlns:bdd="bdd.com" xmlns="bubba.com"> + <test>Test5</test> + <test xmlns="missing.com">Test6</test> + + </out> + + Expected Ouput + ================================================= + <?xml version="1.0" encoding="UTF-8"?> + <out xmlns:bdd="bdd.com" xmlns="bubba.com"> + <ped:test xmlns:ped="ped.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> + <test xmlns="ped.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:ped="ped.com"/> + <bdd:test xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ped="ped.com"/> + <test>Test5</test><test xmlns="missing.com">Test6</test> + </out> \ No newline at end of file
