W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

RE: Inability of location steps to support multiple axes

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 10 Sep 2003 16:11:35 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD0FE@daemsg02.software-ag.de>
To: emerson@harvestman.net, public-qt-comments@w3.org, Michael.Kay@softwareag.com


> -----Original Message-----
> From: Emerson [mailto:emerson@harvestman.net] 
> Sent: 10 September 2003 12:52
> To: public-qt-comments@w3.org; Michael.Kay@softwareag.com
> Subject: RE: Inability of location steps to support multiple axes
> 
> 
> 
> Michael, could you point me to the grammar where this is 
> allowable in Xpath 2.0
> 
> I can see no such derivation:
> http://www.w3.org/TR/xpath20/#doc-StepExpr


A StepExpr can be a FilterStep, a FilterStep can be a PrimaryExpr, and a
PrimaryExpr can be a ParenthesizedExpr, which can have anything inside it.

In effect, you can now use any expression (subject to operator precedence
rules) as an operand of "/", though the type rules require the expression to
deliver node()*.

Michael Kay





>> So the above example would become:
>> 
>> "parent::a/(following-sibling::* | preceding-sibling::*)//text()"
>> 
>> Which in my opinion is logically much more concise...
>> 
>> It could be that I am missing something, but I believe your
>> proposal is possible in XPath 2.0. 
>
>Correct, this expression is valid in XPath 2.0.
>Michael Kay
Received on Wednesday, 10 September 2003 10:11:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:01 GMT