This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Hi all, In the XPath 2.0 grammar specified at, http://www.w3.org/TR/xpath20/#nt-bnf I find some problems. I have difficulty understanding the production named, IfExpr (shown below): IfExpr ::= "if" "(" Expr ")" "then" ExprSingle "else" ExprSingle Where as, ExprSingle is defined as: ExprSingle ::= ForExpr | QuantifiedExpr | IfExpr | OrExpr The following XPath 2.0 expressions are reported legal by Saxon 9. if (x = '1') then 'hello' else 'world' and if (x = '1') then 'hello' else () I think these expressions should be legal from user's point of view (and Saxon is right), but the XPath 2.0 grammar doesn't cater to these cases. Regards, Mukul
If you follow the expansion of OrExpr you will see that 'string' and () are both legal instances of OrExpr.
(In reply to comment #1) > If you follow the expansion of OrExpr you will see that 'string' and () are > both legal instances of OrExpr. > Sorry, I didn't follow the rules quite deeply. Thanks for pointing this to me. Regards, Mukul