[XSL-LIST Mailing List Archive Home]
Re: [xsl] Selecting other than certain children
Subject: Re: [xsl] Selecting other than certain children|
From: Joerg Pietschmann <j3322ptm@xxxxxxxx>
Date: Thu, 2 Jan 2003 14:02:57 +0100
On Thursday 02 January 2003 07:17, Conal Tuohy wrote:
> I don't really know if "not(self::c)" is more efficient than "name()!='c'"
> but I prefer it for some reason, maybe because there's no function call?
I don't think there is a performance difference for most XSLT processors.
However, using self:: is mnore robust when it comes to elements in a
namespace. If you write
only elements with the literal name foo:bar fulfill this condition but not
baz:bar, even if the baz prefix is bound to the same namespace.
<sample xmlns:foo="uri:sample:stuff" xmlns:baz="uri:sample:stuff">
the inner elements have different a name(), but they are both matched
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list