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

Re: [xsl] Removing entire branches from a node-set


Subject: Re: [xsl] Removing entire branches from a node-set
From: cactus@xxxxxxxxxxxxxxxx
Date: Sun, 16 Jan 2005 16:32:59 +0100 (CET)

On Mon, 10 Jan 2005, David Carlisle wrote:

> You can generate a result tree in which every element satisfies
> @lang='en' or not(@lang) by
>
> <xsl:template match="*">
>   <xsl:copy>
>   <xsl:copy-of select="@*"/>
>   <xsl:apply-templates/>
>   </xsl:copy>
> </xsl:template>
>
> <xsl:template match="*[not(@lang='en' or not(@lang))"/>

Thanks, this is what I ended up doing (except I forgot about copy/copy-of
and implemented it myself instead)


Current Thread