diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml
index 9e3e0f5e2..72c9ea433 100644
--- a/specifications/xpath-functions-40/src/function-catalog.xml
+++ b/specifications/xpath-functions-40/src/function-catalog.xml
@@ -23027,7 +23027,7 @@ xs:QName('xs:double')
$options
) argument.
$options
argument.
@@ -23045,6 +23045,22 @@ xs:QName('xs:double')
def="option-parameter-conventions"
>option parameter conventions apply.
+
+ In the event that two or more entries in the input maps have the
+
A single entry is created by combining the values of the duplicates,
+ in a way determined by the supplied $options
.
The key of the combined entry is one of the duplicate keys:
+ which one is chosen is xs:dateTime
+ values with different timezones.)
The position of the combined entry in the
The entries that may appear in the $options
map are as follows:
$maps
contain entries with key values
K1 and K2 where K1 and K2 are the
combine
+ option are mutually exclusive.
"combine": fn(){error(xs:QName("err:FOJS0003"), ...)
+ (the remaining arguments to $maps
argument.
+ >Equivalent to specifying "combine": fn($a, $b){ $a }
.
$maps
argument.
+ >Equivalent to specifying "combine": fn($a, $b){ $b }
.
"combine": fn($a, $b){ one-of($a, $b) }
+ where one-of
chooses either $a
or $b
in
+ an $maps
argument.
- The key value in the result map that corresponds to such a set of duplicates must
- be the xs:byte(1)
- and xs:short(1)
, the key in the result could legitimately be xs:long(1)
.
+ >Equivalent to specifying "combine": fn($a, $b){ $a, $b }
.
$maps
contain entries with key values
+ K1 and K2 where K1 and K2 are the
+ duplicates
+ option are mutually exclusive.
+ fn(item()*, item()*) as item()*
.
+ The function is called for any entry in an input map that has the
+ An error is raised combine
and duplicates
+ options are present.
An error is raised $options
indicates that duplicates are to be rejected, and a duplicate key is encountered.
By way of explanation, $combine
is a function that combines
- two maps by iterating over the keys of the second map, adding each key and its corresponding
- value to the first map as it proceeds. The second call of return
clause then iterates over the maps supplied in the call
- to $combine
.
This algorithm processes the supplied maps in a defined order, but processes the keys within - each map in implementation-dependent order.
- +By way of explanation, the function first reduces the sequence of input maps
+ to a sequence of key-value pairs, retaining order of both the maps and of the
+ entries within each map. It then combines key-value pairs having the
+ $combine
function
+ successively to pairs of duplicates. The position in the use-last
is used: the value of the resulting
+ entry corresponds to the last entry with a given key, but the position of the entry
+ in the result map corresponds to the position of the first entry with that key.
+
The use of For consistency with the new functions "duplicates": "use-any"
, but it is not the only conformant
implementation and is not intended to be a realistic implementation. The purpose of this
@@ -23270,6 +23268,14 @@ return fold-left($maps, {},
+ combine
option as an alternative
+ to the existing duplicates
option.$input
argument.
The $options
argument can be used to control the ordering of the result,
- and the way in which duplicate keys are handled.
+
The $options
argument can be used to control
+ the way in which duplicate keys are handled.
The
The entries that may appear in the $options
map are as follows:
If the key is already present, the processor calls the combine
function in the $options
argument to combine the existing value for the key with the new value,
- and replaces the entry with this combined value.
The key of the combined entry is taken from one of the duplicate entries:
+ it is xs:dateTime
values with different timezones.)
+
The position of the combined entry in the
The $options
argument can be used to control the way in which duplicate keys are handled.
- The
The $options
argument can be used to control the
+ and the way in which duplicate keys are handled.
+ The
The entries that may appear in the $options
map are as follows:
The entries that may appear in the $options
map are as follows:
Raised if the option in an
Raised if an inconsistent set of options is supplied
+ in an