diff --git a/specifications/xquery-40/src/expressions.xml b/specifications/xquery-40/src/expressions.xml index 9acf04901..7861bb26c 100644 --- a/specifications/xquery-40/src/expressions.xml +++ b/specifications/xquery-40/src/expressions.xml @@ -18688,26 +18688,24 @@ subexpressions of the quantified expression that appear after the variable bindi matching, a type error is raised .

-

The order in which test expressions are evaluated for the various binding -tuples is The order in which test expressions are evaluated + for the various items in the binding sequence is implementation-dependent. If the quantifier -is some, an implementation may -return true as soon as it finds one binding tuple for which the test expression has -an effective boolean value of true, and it may raise a dynamic error as soon as it finds one binding tuple for -which the test expression raises an error. Similarly, if the quantifier is every, an implementation may return false as soon as it finds one binding tuple for which the test expression has -an some, an implementation may + return true as soon as it finds one item for which the test expression has + an effective boolean value of true, and it may raise a dynamic error as soon as it finds one item for + which the test expression raises an error. Similarly, if the quantifier is every, an + implementation may return false as soon as it finds one item for which the test expression has + an effective boolean value of false, and it may raise a dynamic error as soon as it finds one binding tuple for -which the test expression raises an error. As a result of these rules, the -value of a quantified expression is not deterministic in the presence of -errors, as illustrated in the examples below.

+ def="dt-dynamic-error">dynamic error as soon as it finds one item for + which the test expression raises an error. As a result of these rules, the + value of a quantified expression is not deterministic in the presence of + errors, as illustrated in the examples below.

+

Here are some examples of quantified expressions:

@@ -18749,7 +18747,7 @@ one employee element satisfies the given comparison expression:

In the following examples, each quantified expression evaluates its test -expression over nine pairs of variable bindings, formed from the Cartesian +expression over nine pairs of items, formed from the Cartesian product of the sequences (1, 2, 3) and (2, 3, 4). The expression beginning with some evaluates to true, and the expression beginning with every evaluates to false.

@@ -18763,7 +18761,7 @@ satisfies $x + $y = 4]]>

This quantified expression may either return true or raise a type error, since its test expression returns true for one variable binding + >type error, since its test expression returns true for one item and raises a type error for another:

@@ -18775,10 +18773,16 @@ and raises a

This quantified expression may either return false or raise a type error, since its test expression returns false for one variable binding and raises a type error, since its test expression returns false for one item and raises a type error for another:

+ + +

This quantified expression returns true, because the binding sequence + is empty, despite the fact that the condition can never be satisfied:

+ +