This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to copy all child elements except specific one?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] How to copy all child elements except specific one?
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 16 Jan 2001 23:44:26 GMT
- References: <2B92A3D0D399D311BA7E00A0C90F8FDD88BE81@mailgate.snellingcorp.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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