This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I've just noticed that the try/catch expression requires parens in some circumstances. The following are allowed: (try {$x cast as xs:integer} catch * {1}) + 1 (try {$x cast as xs:integer} catch * {1}) eq 1 Remove the parens and these expressions do not parse. This comes about because we placed TryCatchExpr in ExprSingle: [40] ExprSingle ::= FLWORExpr | QuantifiedExpr | SwitchExpr | TypeswitchExpr | IfExpr | TryCatchExpr | OrExpr Perhaps it would be better located in ValueExpr: [96] ValueExpr ::= ValidateExpr | PathExpr | ExtensionExpr
Good suggestion.
The Working Group has decided not to make this change.