Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Duplicate
-
2.7
-
None
-
None
-
Xalan-J 2.7.0, JDK 1.5.0_04, Win XP Prof
Description
There seems to be some problem with xsl:copy-of while copying namespace nodes..
Please consider this example.
Source XML:
<?xml version="1.0" ?>
<!-- this is a comment -->
<?pqr x="do-something" ?>
<author xmlns:a="xyz" xmlns:b="pqr">
<person a:age="30"> by <FirstName>Jane</FirstName>
<LastName>Doe</LastName>,
</person>
</author>
XSLT Stylesheet:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/author">
<test>
<xsl:copy-of select="namespace::*" />
</test>
</xsl:template>
</xsl:stylesheet>
The right output of transformation should be:
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns:a="xyz" xmlns:b="pqr"/>
But Xalan-J 2.7.0 produces output..
<?xml version="1.0" encoding="UTF-8"?>
<test/>
I think that this is a non-conformance according to XSLT 1.0 spec.
The relevant section of the spec is:
Erratum E25 at
http://www.w3.org/1999/11/REC-xslt-19991116-errata/.
Regards,
Mukul
Attachments
Issue Links
- duplicates
-
XALANJ-1959 Failure to copy namespace nodes
- Open