[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to copy all child elements except specific one?


Subject: Re: [xsl] How to copy all child elements except specific one?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 Jan 2001 23:44:26 GMT

> I want to get here:

Oh, so all you need is this:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"
                >

<xsl:template match="*|/">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

<xsl:template match="ChildElementToChange">
<xsl:copy>
<NewElement>
 <xsl:copy-of select="../@L3Attr|@*"/>
<xsl:apply-templates/>
</NewElement>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

David

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread