This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XPath help
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] XPath help
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 7 Sep 2001 16:54:59 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Any ideas on which answer is correct?
>
> <xsl:for-each select="*[not(name()='a' or name()='b')]">
>
> [not(self::a or self::b)]
>
> <xsl:for-each select="*[not(local-name()='a' or local-name()='b')]">
The second is the only one of the three that handles namespaces correctly.
But with a document that only uses <a> and <b> as unprefixed and
unnamespaced element names, all three will work fine.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list