diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml index faefefa3b..8744e1970 100644 --- a/specifications/xpath-functions-40/src/function-catalog.xml +++ b/specifications/xpath-functions-40/src/function-catalog.xml @@ -12215,7 +12215,7 @@ let $newi := $o/tool -

Assuming $in is an element with no children:

+

Assuming $break is an element with no children:

let $break := <br/> return empty($break) @@ -12274,7 +12274,7 @@ return empty($break)
-

Assuming $in is an element with no children:

+

Assuming $break is an element with no children:

let $break := <br/> return exists($break) @@ -13145,6 +13145,9 @@ return error((), 'Duplicate IDs found: ' || string-join($ids, ', '))

If any integer in $at is outside the range 1 to count($input), that integer is effectively ignored: no error occurs.

If either of the arguments is an empty sequence, the result is an empty sequence.

+

If $at contains duplicate integers, the result also contains duplicates. No de-duplication + occurs. If the input sequence contains nodes, these are not copied: instead, the result + sequence contains multiple references to the same node.

@@ -13169,6 +13172,10 @@ return error((), 'Duplicate IDs found: ' || string-join($ids, ', ')) items-at(characters("quintessential"), (4, 8, 3)) ("n", "s", "i") + + items-at(characters("quintessential"), (4, 8, 3, 1, 1)) + ("n", "s", "i", "q", "q") + items-at((), 832) () @@ -13239,6 +13246,9 @@ return error((), 'Duplicate IDs found: ' || string-join($ids, ', ')) $end are positive and $end > $start, fn:slice($in, $start, $end) returns the same result as $in[position() = $start to $end].

+

This function can be used to enhance the RangeExpression, defined + in , to construct a sequence + of integers based on steps other than 1.

@@ -13325,6 +13335,18 @@ return error((), 'Duplicate IDs found: ' || string-join($ids, ', ')) ("a", "b", "c", "d")
+ + + slice((1 to 5), step := 2) + (1, 3, 5) + + + + + slice((1 to 5), step := -2) + (5, 3, 1) + + Proposed for 4.0; not yet reviewed. @@ -13708,6 +13730,8 @@ return contains-subsequence( not specified. For example, when retrieving prices from a purchase order, if an index exists on prices, it may be more efficient to return the prices in index order rather than in document order.

+

This function does not guarantee that the resulting sequence will be in an order + different from the input sequence. Many times the two sequences will be identical.

@@ -14597,7 +14621,7 @@ declare function equal-strings( parse-xml(" x"), options := map { 'whitespace': 'normalize' } )]]> - false() + true() The whitespace option causes both the leading space in the attribute value and the whitespace preceding the span element to be ignored. @@ -16058,7 +16082,8 @@ else $c[1] + sum(subsequence($c, 2)) items that do not have any URI; or a URI collection might contain URIs that cannot be dereferenced to return any resource.

-

Thus, some implementations might ensure that calling fn:uri-collection and then + +

Thus, some implementations might ensure that calling fn:uri-collection and then applying fn:doc to each of the returned URIs delivers the same result as calling fn:collection with the same argument; however, this is not guaranteed.

@@ -16199,7 +16224,7 @@ else $c[1] + sum(subsequence($c, 2)) processor does not support the specified encoding, if the string representation of the retrieved resource contains octets that cannot be decoded into Unicode characters using the specified - encoding, or if the resulting characters are not + encoding, or if any resulting character is not a permitted character.

A dynamic error is raised if $encoding @@ -16321,17 +16346,20 @@ else $c[1] + sum(subsequence($c, 2))

The unparsed-text-lines function reads an external resource (for example, a file) and returns its string representation as a sequence of strings, separated at newline boundaries.

-

The result of the single-argument function is the same as the result of the expression - fn:tokenize(fn:unparsed-text($href), '\r\n|\r|\n')[not(position()=last() and + +

The result of the single-argument function is the same as the result of the expression + fn:tokenize(fn:unparsed-text($href), '\n')[not(position()=last() and .='')]. The result of the two-argument function is the same as the result of the expression fn:tokenize(fn:unparsed-text($href, $encoding), - '\r\n|\r|\n')[not(position()=last() and .='')].

+ '\n')[not(position()=last() and .='')].

The result is thus a sequence of strings containing the text of the resource retrieved - using the URI, each string representing one line of text. Lines are separated by one of - the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not + using the URI, each string representing one line of text. End-of-line x0D is + removed or converted to x0A following the rules of fn:unparsed-text. + Newline characters xOA are not included in the returned strings. If there are two adjacent newline sequences, a zero-length string will be returned to represent the empty line; but if the external - resource ends with the sequence x0A, x0D, or x0Dx0A, the result will be as if this final + resource ends with a newline character, the result will be as if this final line ending were not present.

diff --git a/specifications/xpath-functions-40/src/xpath-functions.xml b/specifications/xpath-functions-40/src/xpath-functions.xml index 8c85460e2..75c35a68f 100644 --- a/specifications/xpath-functions-40/src/xpath-functions.xml +++ b/specifications/xpath-functions-40/src/xpath-functions.xml @@ -5368,7 +5368,7 @@ correctly in all browsers, depending on the system configuration.

--> Functions and operators on sequences

A sequence is an ordered collection of zero or more items. - An item is either a node or an atomic value. The terms + An item is a node, an atomic value, or a function, such as a map or an array. The terms sequence and item are defined formally in and .

General functions and operators on sequences