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/18 23:51:52 UTC
DO NOT REPLY [Bug 22534] New: -
namespace nodes are not copied by copy-of
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=22534>.
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=22534
namespace nodes are not copied by copy-of
Summary: namespace nodes are not copied by copy-of
Product: XalanJ2
Version: 2.5Dx
Platform: Sun
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.transformer
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: rudnev@eastbanctech.com
Using xalan-2.5.1 under cocoon-2.1, jdk 1.4 with updated endorsed libs from
latest cocoon distribution.
Source XML:
<?xml version="1.0" encoding="UTF-8"?>
<xpath xmlns:foo="http://bugs.com/copy-of-namespaces" expr="/foo:bar" />
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<test>
<xsl:apply-templates mode="ns-copy" />
<xsl:apply-templates mode="full-copy" />
</test>
</xsl:template>
<xsl:template match="xpath" mode="ns-copy">
<xpath>
<xsl:copy-of select="namespace::*" />
<xsl:value-of select="@expr" />
</xpath>
</xsl:template>
<xsl:template match="xpath" mode="full-copy">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
Expected XML:
<?xml version="1.0" encoding="UTF-8"?>
<test>
<xpath xmlns:foo="http://bugs.com/copy-of-namespaces">/foo:bar</xpath>
<xpath xmlns:foo="http://bugs.com/copy-of-namespaces"
expr="/foo:bar" />
</test>
Actual XML:
<?xml version="1.0" encoding="UTF-8"?>
<test>
<xpath>/foo:bar</xpath>
<xpath xmlns:foo="http://bugs.com/copy-of-namespaces"
expr="/foo:bar" />
</test>