bug with <x:copy> on namespaced attributes
Posted: Mon Dec 26, 2005 12:54 pm
hi,
i've some issue with xsl transform when i'm using <x:copy> tag.
I don't know if it is a know bug or if i do something wrong.
It seem like Xalan processor can't copy namespaced attributes.
I've give an example for more understanding.
My xml File
My xsl File (xsl.xsl)
Result in browser
anyone can help ??
Thanks in advance
Fabrice.
i've some issue with xsl transform when i'm using <x:copy> tag.
I don't know if it is a know bug or if i do something wrong.
It seem like Xalan processor can't copy namespaced attributes.
I've give an example for more understanding.
My xml File
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsl.xsl" type="text/xsl"?>
<tag xmlns:test1="namespace" test2="noNamespace" />
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/tag">
<xsl:copy>
namespaced attribute : <xsl:apply-templates select="@xmlns:test1"/>
</xsl:copy>
|||
<xsl:copy>
normal attribute : <xsl:apply-templates select="@test2"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Code: Select all
namespaced attribute : ||| normal attribute : noNamespace
Thanks in advance
Fabrice.