This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2568 - nodecomparisonerr-1/2/3 are implementation-dependent
Summary: nodecomparisonerr-1/2/3 are implementation-dependent
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.2
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-07 16:51 UTC by Alberto Massari
Modified: 2006-01-04 13:23 UTC (History)
0 users

See Also:


Attachments

Description Alberto Massari 2005-12-07 16:51:02 UTC
The three queries all compare () with 100 using different node operators,
expecting the error XPTY0004. But the spec say 

3.5.3 Node Comparisons
...
1) The operands of a node comparison are evaluated in implementation-dependent
order.
3) If either operand is an empty sequence, the result of the comparison is an
empty sequence, and the implementation need not evaluate the other operand or
apply the operator. However, an implementation may choose to evaluate the other
operand in order to determine whether it raises an error.

So, an implementation is allowed to check that the first operand is the empty
sequence and bail out, without testing 100 (and raising the error)

A better test would be "$input-context1 is 100"
Comment 1 Carmelo Montanez 2005-12-15 21:46:17 UTC
Alberto:

I still like the test as is.  I will like to change the entry to either
expect the empty sequence or raise the error.  That should cover whatever
way the implementation chooses to evaluate the expression.

Thanks,
Carmelo
Comment 2 Carmelo Montanez 2005-12-16 18:57:30 UTC
Test/Results changed:  Changed the tests to make them able to catch a "0"
result (by adding fn:count) whenever an implementation chooses to bail out 
(after finding the empty sequence) and not look at the second operand.  The 
entry now allows for both situations.

Submitted changed tests and expected results.

Close bug if in agreement.

Thanks,
Carmelo