| <xsl:template match="*">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
read the whole answer by Michael Kay (XSL deity)
http://www.stylusstudio.com/xsllist/200501/post00240.html
where he outlines the much simpler xsl 2 solution |