Project

Profile

Help

Bug #2297

closed

Multiple comparisons in expressions wrongly allowed in XQuery syntax

Added by Debbie Lockett about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Low
Category:
XQuery conformance
Sprint/Milestone:
Start date:
2015-01-20
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

Description

Saxon allows multiple comparison operators in an expression (non-parenthesized), but this should not be allowed. e.g. See the failure of QT3 test op-boolean-equal-18: the expression 'true() eq true() eq true() eq true()' evaluates to true, but it should give a syntax error.

Actions #1

Updated by Michael Kay about 9 years ago

Another example is

10 to 10 to 11

which Saxon incorrectly accepts as valid, returning the result (10, 11).

Test case -s:op-to -t:rangeExpr-33 added.

Actions #2

Updated by Debbie Lockett about 9 years ago

  • Status changed from New to Resolved
  • Assignee set to Debbie Lockett
  • % Done changed from 0 to 100

Associativity of operator check added to precedence algorithm in parseBinaryExpression() method of XPathParser.

Patch committed to subversion (for 9.6 and 9.7). A few more test cases also added (to op-GeneralComp.eq, op-GeneralComp.lt, prod-is-same-node test sets).

Actions #3

Updated by O'Neil Delpratt about 9 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 9.6.0.5

Bug fix applied in the Saxon 9.6.0.5 maintenance release.

Actions #4

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone set to 9.6.0.5
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.5 added

Please register to edit this issue

Also available in: Atom PDF