- From: Laurens Holst <lholst@students.cs.uu.nl>
- Date: Wed, 17 Nov 2004 14:31:19 +0100
- To: www-xpath-comments@w3.org
What about creating shorthands for following-sibling and preceding-sibling in XPath 2.0? following-sibling::chapter[fn:position() = 1] could be +chapter[1] and preceding-sibling::chapter[fn:position() = 1] could be -chapter[1] 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. ~Grauw -- Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
Received on Wednesday, 17 November 2004 13:31:59 UTC