W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2002

XPath attributes

From: Cliff Binstock <binstock@pacifier.net>
Date: Tue, 26 Feb 2002 12:18:24 -0500 (EST)
Message-ID: <006301c1bee9$c6cbffc0$290d2b42@moomoo>
To: <www-xpath-comments@w3.org>
Looking at the XPath Recommendation, it appears that the notation

element[@attribute]

is not actually supported by the grammar.

In particular, I was looking at the grammar to see if the following
statements would return the same results, albeit through
different mechanism (I assume they would, maybe someone can
comment):

a/@b
a/attribute::b
a[@b]
a[attribute::b]

Note that this observation applies to both the shortcut '@' as well as the
normal 'attribute::' notation.

Specifically, it appears that the only way to add '[]' is via a "predicate",
and a predicate does not seem to permit node notations
(of interest of course is '@' or 'attribute::').

Cliff Binstock
binstock@pacifier.net
Received on Tuesday, 26 February 2002 13:03:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:54 GMT