This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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"
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
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