This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: XPath help


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]