- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 18 Jul 2008 14:46:29 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5876 Summary: [XPath] Is it an error for an operator to be contained in parentheses? Product: XPath / XQuery / XSLT Version: Recommendation Platform: All URL: http://www.w3.org/TR/xpath20/#id-precedence-order OS/Version: All Status: NEW Severity: trivial Priority: P2 Component: XPath AssignedTo: chamberl@almaden.ibm.com ReportedBy: zongaro@ca.ibm.com QAContact: public-qt-comments@w3.org A co-worker pointed out that section A.4 of XPath 2.0[1] (and equally, of XQuery 1.0) states that "operators are summarized here to make clear the order of their precedence from lowest to highest. Operators that have a lower precedence number cannot be contained by operators with a higher precedence number." The table that follows that statement has entries for the various operators, including binary plus and minus, with a precedence of eight, and parentheses, square brackets and brace brackets, with a precedence of nineteen. Because parentheses have a higher precedence number than binary plus, the only conclusion seems to be that a plus operator cannot be contained in parentheses. Clearly that's false, and some special treatment is needed. Perhaps the third sentence of the first paragraph could be reworded to say "Operators that have a lower precedence number cannot be contained by operators with a higher precedence number, except that any operator can be contained in parentheses, brace brackets and square brackets, and an operator can contain an expression in parentheses, brace brackets or square brackets that contains another operator with lower precedence number than the operator," where the two occurrences of ", brace brackets" only apply to XQuery. (Of course these statements about operators containing operators really should be speaking of expressions containing operators or expressions whose operands contain particular operators, but I didn't want to go too far with the proposed rewording.) Note also that braces appear in the table for XPath, but exist only in XQuery. [1] http://www.w3.org/TR/xpath20/#id-precedence-order -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Friday, 18 July 2008 14:47:02 UTC