This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Please consider the following 2 expressions: for $a in outer for $b in c return d for $a in outer for $b in c return d return e Both are syntactically correct. In the first 'outer' is relative path and in the second it is part of "outer for" clause. To distinguish between the 2 a parser needs to look across c which is generally ExprSingle and hence - recursive. This is of course a problem for LL parsers. Feasibility of LL parsing is not necessarily a requirement for XQuery 1.1 grammar but it is certainly a nice feature, so I wonder whether you would you consider the possibility of changing the syntax. Two options that I would suggest are: ForClause ::= ("for" | "outer" ) "$" VarName TypeDeclaration? PositionalVar? "in" ExprSingle ("," "$" VarName TypeDeclaration? PositionalVar? ForClause ::= ("for" | "outer-for") "$" VarName TypeDeclaration? PositionalVar? "in" ExprSingle ("," "$" VarName TypeDeclaration? PositionalVar? Thank you Regards Nikolay
P.S. Sorry, this has already been reported. *** This bug has been marked as a duplicate of bug 6927 ***
This bug was resolved as a duplicate of bug 6927 over four years ago. I am therefore marking it CLOSED.