diff --git a/etc/status-general.xml b/etc/status-general.xml
index c4c765e5a..1fc8c6bad 100644
--- a/etc/status-general.xml
+++ b/etc/status-general.xml
@@ -71,4 +71,10 @@
&patent-policy-paragraph;
-
\ No newline at end of file
+ The publications of this community group
+
The publications of this community group
+
The publications of this community group
+
+
+
+
+
+
+
+
+
The dm:iterate-sequence
accessor calls the supplied $action
function once for each item in $input
, in order,
- and returns the sequence concenation of the results. The $action
function
+ and returns the sequence concatenation of the results. The $action
function
is called with two arguments. The first argument is an item in $input
,
and the second is the 1-based ordinal position of the item within $input
.
Maps have no intrinsic identity separate from their content. A map can be given
a transient identity, represented by an id
property in its label, by applying the
fn:pin
function. This property is expected to be used in defining
@@ -1533,18 +1533,27 @@ values. The semantics of equality are described in
Constructor and accessor functions for maps are defined in the following sections.
empty-map
Constructor
The dm:empty-map
constructor returns a map containing no key/value pairs.
The function is exposed in XPath as an empty map constructor, which may be written {}
- or map {}
.
In XPath an empty map may be constructed using the expression {}
+ or map {}
.
One key/value pair whose key is $key
and whose associated value is $value
.
The function is exposed in XPath through the function map:put
.
The $map
. If the key of
+ the new entry was present in $map
then the new entry replaces that entry retaining
+ its current position; otherwise, the new entry is added after all existing entries.
The function is exposed in XPath through the function
The $action
- function once for each key/value pair in $map
, in implementation-dependent order,
- and returns the sequence concenation of the results.
The dm:iterate-map
accessor calls the supplied $action
+ function once for each key/value pair in $map
,
+ and returns the sequence concenation of the results. The order in which entries
+ are processed is the
The function is exposed in XPath most directly through the function map:for-each
, but
- it also underpins all other functions giving access to maps, such as map:size
,
- map:contains
, and map:get
.
The function is exposed in XPath most directly through the function
parameter names: ()
signature: () => map(xs:string, item())
signature: () => random-number-generator-record
non-local variable bindings: none
@@ -2065,6 +2065,10 @@ compare($N * $arg2, 0) eq compare($arg1, 0).$value
.
There may be $precision
is outside this range, it should
+ be adjusted to the nearest value supported by the implementation.
A third argument has been added, providing control over the rounding mode.
It is explicitly stated that the limits for $precision
+ are implementation-defined.
There may be $precision
is outside this range, it should
+ be adjusted to the nearest value supported by the implementation.
It is explicitly stated that the limits for $precision
+ are implementation-defined.
If $precision
exceeds the maximum precision for xs:decimal
- values supported by the implementation, then the maximum available precision is
- used in its place.
There may be $precision
is outside this range, it should
+ be adjusted to the nearest value supported by the implementation.
xs:NCName
. For the default namespace, which has no prefix, the key is
the zero-length string as an instance of xs:string
.
-
+ The order of entries in the returned map is
It is not required that the order of entries in the two maps should be the same.
All the following conditions are true:
@@ -23081,6 +23100,29 @@ xs:QName('xs:double') + @@ -23118,6 +23160,7 @@ return fold-left($maps, {}, /> if the value of$options
includes an entry whose key is defined
in this specification, and whose value is not a permitted value for that key.
+
If the input is an empty sequence, the result is an empty map.
If the input is a sequence of length one, the result map is
There is no requirement that the supplied input maps should have the same or compatible +
There is no requirement that
+ the supplied input maps should have the same or compatible
types. The type of a map (for example map(xs:integer, xs:string)
) is
descriptive of the entries it currently contains, but is not a constraint on how the map
may be combined with other maps.
$input
argument.
- The optional $combine
argument can be used to define how
- duplicate keys should be handled. The default is to form the sequence concatenation
- of the corresponding values, retaining their order in the input sequence.
The $options
argument can be used to control the ordering of the result,
+ and the way in which duplicate keys are handled.
+ The
The entries that may appear in the $options
map are as follows:
The function can be made to fail with a dynamic error in the event that
duplicate keys are present in the input sequence by supplying a $combine
function that invokes the
6
is obtained by concatenating the values
from the two input maps, with a separator character.The following expression takes an existing map and sorts its entries into key order:
+New in 4.0
Informally, the function $map
argument and returns
- the keys that are present in the map as a sequence of atomic items, in
The function is
$map
argument. The
$predicate
function takes the key and the value of the corresponding
map entry as an argument, and the result is a sequence containing the keys of those
- entries for which the predicate function returns true
in ()
is treated as false
.
+ entries for which the predicate function returns true
, in
+ A return value of ()
from the predicate function is
+ treated as false
.
The function is Returns a sequence containing all the values present in a map, in unpredictable order. Returns a sequence containing all the values present in a map, in order. The function The function is $map
argument and returns the values that are present in the map as
- a sequence, in
The effect of the function is equivalent to $map?*
.
The function $map
argument and returns the key-value pairs that are present in the map as
- a sequence of
The function is
The function $map
argument and returns the keys that are present in the map as
- a sequence of
A key-value pair map is an instance of type record(key as xs:anyAtomicType, value as item()*)
:
that is a map with two entries, one (with key "key"
) holding the key,
and the other (with key "value"
) holding the value.
The function is
New in 4.0
To process an item that is a map, then for each key-value entry (K, V)
- in the map (in
Enhanced to allow for ordered maps.
$key
, together with a new
entry whose key is $key
and whose associated value is $value
.
+
+ The $map
contains an entry whose key is $key
,
+ then the new value replaces the old value and the position of the entry is not changed;
+ otherwise, the new entry is added after all existing entries.
If the key is not already present in the target map, the processor adds a - new key-value pair to the map, with that key and that value.
If the key is already present, the processor calls the $combine
- function to combine the existing value for the key with the new value,
+ new key-value pair to the map, with that key and that value.
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 $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:
Although defined to process the input sequence in order, this is only relevant when combining the entries - for duplicate keys.
+The default function for both $keys
and $value
is the identity function.
Although it is permitted to default both, this serves little purpose: usually at least one of these arguments
will be supplied.
fn:concat(?, ",", ?)
Form the string-concatenation of the values, comma-separated
fn:op('+')
Compute the sum of the values
The $input
from which they were derived. In the
+ event that two entries have duplicate keys, the position of the combined entry
+ in the result reflects the position of the first input item with that key.
The following expression creates a map whose keys are employee @location
values, and whose
corresponding values represent the number of employees at each distinct location. Any employees that
lack an @location
attribute will be excluded from the result.
The following expression creates a map whose keys are employee @location
values, and whose
@@ -24699,6 +24877,157 @@ return map:build($titles/title, fn($title) { $title/ix })
The XDM tree returned by the function does not contain any
unnecessary (albeit valid) nodes such as whitespace text nodes, comments, or processing instructions.
It does not include any whitespace in the value of number
or boolean
- element nodes, escaped
or escaped-key
- attribute nodes.
escaped
or escaped-key
+ attribute nodes.
If the result is typed, every element named string
will have an attribute named
@@ -25676,7 +26005,8 @@ return json-to-xml($json, $options)]]>
the children of the map
element, enclosed between curly braces and separated by commas.
Each entry comprises the value of the key
attribute of the child element, enclosed in quotation marks
and escaped as described below, followed by a colon, followed by the result of processing the child element
- by applying these rules recursively.
map
element.
Comments, processing instructions, and whitespace text node children of map
and array
@@ -27098,6 +27428,20 @@ return document {
+
+
{ "x": 2, "y": 5 }
.
If duplicate keys are encountered in a JSON duplicates
option defined above.
The order of entries is retained.
A JSON true
, but this appears to have been an error,
since it was inconsistent with examples given in the specification and with tests in the test suite.
The order of entries in maps is retained.
+derived-value(M', K, V)
,
defined below.
+ The
If $input
is an array A, the result is an array A'
diff --git a/specifications/xpath-functions-40/src/xpath-functions.xml b/specifications/xpath-functions-40/src/xpath-functions.xml
index 2a81de662..8a7422e3d 100644
--- a/specifications/xpath-functions-40/src/xpath-functions.xml
+++ b/specifications/xpath-functions-40/src/xpath-functions.xml
@@ -216,6 +216,12 @@ for transition to Proposed Recommendation.
The publications of this community group
+
All entries in the options map are optional, and supplying an empty map has the same effect as omitting the relevant argument in the function call, assuming this is permitted.
The ordering of the options map is immaterial.
For each named option, the function specification defines a required type for the option value. The value that is actually supplied in the map is converted to this required type using the @@ -857,16 +864,19 @@ the relationship of various item types.
in declaring the types of variables or the argument types and result types of functions. -Item types in the data model form a directed graph, rather than a +
In XDM, item types include node types,
+function types, and built-in atomic types.
+Item types form a directed graph, rather than a
hierarchy or lattice: in the relationship defined by the
derived-from(A, B)
function, some types are derived from
more than one other type. Examples include functions
(function(xs:string) as xs:int
is substitutable for
function(xs:NCName) as xs:int
and also for
-function(xs:string) as xs:decimal
), and union types
-(A
is substitutable for the union type (A | B)
and also
-for (A | C)
. In XDM, item types include node types,
-function types, and built-in atomic types. The diagram, which shows
+function(xs:string) as xs:decimal
), and choice types
+(A
is substitutable for the choice type (A | B)
and also
+for (A | C)
. Record types provide an alternative way of categorizing
+ maps: the instances of record(longitude, latitude)
overlap with
+ the instances of map(xs:string, xs:double)
. The diagram, which shows
only hierarchic relationships, is therefore a simplification of the
full model.
Although the order of entries in a JSON object is generally considered to have no significance, the functions
- json-to-xml
and json-to-xml
both retain order.
json-to-xml
and xml-to-json
both retain order.
The XDM representation of a JSON value may either be untyped (all elements annotated as xs:untyped
, attributes
as xs:untypedAtomic
), or it may be typed. If it is typed, then it