diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml index 0d282d22a..338a0a914 100644 --- a/specifications/xpath-functions-40/src/function-catalog.xml +++ b/specifications/xpath-functions-40/src/function-catalog.xml @@ -23492,9 +23492,9 @@ return map:keys-where($birthdays, fn($name, $date) { - + - + @@ -23507,7 +23507,7 @@ return map:keys-where($birthdays, fn($name, $date) {

Returns a sequence containing all the values present in a map, in unpredictable order.

-

The function map:values takes any The function map:items takes any map as its $map argument and returns the values that are present in the map as a sequence, in - map:values({ 1: "yes", 2: "no" }) + map:items({ 1: "yes", 2: "no" }) ("yes", "no") The result is in implementation-dependent order. - map:values({ + map:items({ 1: ("red", "green"), 2: ("blue", "yellow"), 3: () @@ -23779,7 +23779,7 @@ let $entry := dm:iterate-map($map, fn($k, $v) { }) return ( if (exists($entry)) - then map:values($entry) + then map:items($entry) else $fallback($key) ) @@ -29473,7 +29473,7 @@ return deep-equal( array:for-each($array, fn($member) { [] => array:append($member) }) -=> array:values() +=> array:items()

The function call array:split($array) produces the same result as the @@ -29747,7 +29747,7 @@ declare function flatten( $input as item()* ) as item()* { for $item in $input - return if ($item instance of array(*)) then flatten(array:values($item)) else $item + return if ($item instance of array(*)) then flatten(array:items($item)) else $item };]]>--> - + - + @@ -29809,29 +29809,29 @@ declare function array:flatten(

Unlike array:flatten, the function does not apply recursively to nested arrays.

-

If $A is a single array item, then array:values($A) +

If $A is a single array item, then array:items($A) returns the same result as $A?*.

- array:values(["one", "two", "three"]) + array:items(["one", "two", "three"]) "one", "two", "three" - array:values(["one", ("two", "three")]) + array:items(["one", ("two", "three")]) "one", "two", "three" - array:values(["one", ("two", "three"), ()]) + array:items(["one", ("two", "three"), ()]) "one", "two", "three" - array:values(["one", ["two", "three"]]) + array:items(["one", ["two", "three"]]) "one", ["two", "three"] - array:values([ (), 1, (2 to 4), [ 5 ] ]) + array:items([ (), 1, (2 to 4), [ 5 ] ]) 1, 2, 3, 4, [ 5 ] diff --git a/specifications/xpath-functions-40/src/xpath-functions.xml b/specifications/xpath-functions-40/src/xpath-functions.xml index 87a66fa04..664ec28f5 100644 --- a/specifications/xpath-functions-40/src/xpath-functions.xml +++ b/specifications/xpath-functions-40/src/xpath-functions.xml @@ -7713,7 +7713,7 @@ return - + @@ -7799,6 +7799,9 @@ return

Extract the value part of a single entry

map:values($entry)

map:items($entry)

$key-value-pair?value

+ + + @@ -7832,9 +7835,6 @@ return
- - - @@ -9332,7 +9332,7 @@ return
... , K/n : V/n } is equivalent to map:merge((map:entry(K1, V1), map:entry(K1, V1), ..., map:entry(K/n, V/n)), {"duplicates":"reject"})

The lookup expression $map?* - (see ) is equivalent to map:values($map).

+ (see ) is equivalent to map:items($map).

The lookup expression $map?K, where K is a key value, is equivalent to map:get($map, K)

The expression for key $k value $v in $map return EXPR @@ -9469,6 +9469,9 @@ return

+ + + @@ -9511,9 +9514,6 @@ return
- - - Other Operations on Arrays diff --git a/specifications/xslt-40/src/xslt.xml b/specifications/xslt-40/src/xslt.xml index ad63a5942..4d1685bf7 100644 --- a/specifications/xslt-40/src/xslt.xml +++ b/specifications/xslt-40/src/xslt.xml @@ -14248,7 +14248,7 @@ and version="1.0" otherwise.

the propagation of template parameters:

- + ]]>

The reason there is a special rule for maps with one entry is to ensure that the process