So I want to copy all the document and rename certain nodes.
How can I do
this??
The standard mechanism for "I want to copy all the document except..." is to
use an identity template
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/><xsl:apply-templates/>
</xsl:copy>
</xsl:template>
and then override it for elements you want to change:
<xsl:template match="Pooh">
<xsl:element name="Piglet">
<xsl:copy-of select="@*"/><xsl:apply-templates/>
</xsl:element>
</xsl:template>
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--