On 02.09.2021 17:22, Rob Stapper wrote:
Consider snippets [1] and [2], both result in false(). That can’t be right to me.
[1] () = 4
[2] () != 4
The empty sequence is neither equal to nor unequal to the number 4 as it doesn't contain any item to compare 4 to:
https://www.w3.org/TR/xquery-31/#id-general-comparisons
General comparisons are existentially quantified comparisons that may be applied to operand sequences of any length.
The result of the comparison is true if and only if there is a pair of atomic values, one in the first operand sequence and the other in the second operand sequence, that have the required magnitude relationship. Otherwise the result of the comparison is false.