nickreserved
11-12-2009, 09:44 AM
I want to export an XML with an attribute name="work" to all XML elements.
Here is the XSLT.
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:strip-space elements="*" />
<xsl:template match="*">
<xsl:attribute name="name">work</xsl:attribute>
<xsl:apply-templates />
<xsl:copy-of select="." />
</xsl:template>
Why this doesn't work?
Here is the XSLT.
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:strip-space elements="*" />
<xsl:template match="*">
<xsl:attribute name="name">work</xsl:attribute>
<xsl:apply-templates />
<xsl:copy-of select="." />
</xsl:template>
Why this doesn't work?