RE: [xsl] self axis vs .

Subject: RE: [xsl] self axis vs .
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 6 Jun 2008 23:21:20 +0100
>   But for excluding a set of names from an XPath in XSLT, I 
> rather use the following:
>     <xsl:variable name="to-exclude" as="element()+">
>        <elem1/>
>        <ns:elem/>
>        ...
>     </xsl:variable>
>     *[not(node-name(.) = $to-exclude/node-name(.))]

And there I was thinking "there's no point doing lazy construction of trees;
no-one in their right mind is going to create an element and then only
access its name".

I think I prefer the more direct:

* except (elem1 | ns:elem)

Michael Kay

Current Thread