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

Re: Parentheses may be used for grouping

From: Oleg Tkachenko <olegt@multiconn.com>
Date: Thu, 03 Jan 2002 15:27:55 +0200
Message-ID: <3C345C5B.7050709@multiconn.com>
To: www-xpath-comments@w3.org
James Swift wrote:


> Since parentheses may be used for grouping this is obviously allowed, 
> 
> /foo/bar[ ( fish or cow ) and dog ]
> 
> however am I correct in assuming that the following example supplied in the spec is not allowed according to the grammar?
> 
> (preceding::foo)[1]
> 
> I do understand what it means etc. I just can't work out how (Expr)Predicate is allowed. It's not allowed to have '(' or ')' ina Step either.


Have a look at productions 20 and 15

[20]   FilterExpr   ::=   PrimaryExpr | FilterExpr Predicate
[15]   PrimaryExpr   ::=   VariableReference | '(' Expr ')' | Literal | Number | FunctionCall 



-- 
Oleg Tkachenko
Multiconn International, Israel
Received on Thursday, 3 January 2002 08:26:00 GMT

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