W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2004

[lholst@students.cs.uu.nl: following/preceding-sibling shorthands in XPath 2.0]

From: Liam Quin <liam@w3.org>
Date: Wed, 17 Nov 2004 12:16:56 -0500
To: public-qt-comments@w3.org
Message-ID: <20041117171656.GU18729@w3.org>
This was sent to www-xpath-comments.


Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/

attached mail follows:

What about creating shorthands for following-sibling and 
preceding-sibling in XPath 2.0?

following-sibling::chapter[fn:position() = 1] could be


preceding-sibling::chapter[fn:position() = 1] could be

Neither + or - are legal characters to start an XML element name with, 
so I think this syntax is possible. Other usage examples would be +[1] 
and -[1] for +*[1] and -*[1].

In my company's product we have changed from our own targeting method to 
XPath (shorthand notation), and this is one thing we're missing. We use 
these selectors so often that we currently defined our own syntax for it 
('~+chapter[1]' and '~-chapter[1]'), but we would prefer to use a 
standardized method.


Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
Received on Wednesday, 17 November 2004 17:16:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:02 UTC