xsl-list
[Top] [All Lists]

RE: [xsl] self axis vs .

2008-06-06 15:21:49
  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
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>