Subject: Re: [xsl] Renaming an element when using copy-of From: Chad Chelius <cchelius@xxxxxxxxxxxxxxx> Date: Tue, 20 Jun 2006 10:28:01 -0400 |
You can't do it using xsl:copy-of. Instead you walk the tree using
xsl:apply-templates, changing the name of each node as you go. If there are
nodes you don't want to change, you can handle them with an identity
template:
<xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template>
and then you just write additional rules for the nodes you do want to change.
Michael Kay
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Renaming an element when , Michael Kay | Thread | Re: [xsl] Renaming an element when , Jagdishwar B |
Re: [xsl] Avoid CSS, David Carlisle | Date | [xsl] outputting to original destin, Jeff Rosler |
Month |