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" />
My xsl File (xsl.xsl)
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>
Result in browser
Code: Select all
namespaced attribute : ||| normal attribute : noNamespace
anyone can help ??
Thanks in advance
Fabrice.