From a0d6e1e311c4480e52262ea32266767b830afae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gr=C3=BCn?= Date: Tue, 21 May 2024 14:18:07 +0200 Subject: [PATCH 1/3] Parsing Functions: Empty input. Closes #1193 --- .../src/function-catalog.xml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml index 9ffcff85d..8128c788f 100644 --- a/specifications/xpath-functions-40/src/function-catalog.xml +++ b/specifications/xpath-functions-40/src/function-catalog.xml @@ -2672,8 +2672,8 @@ format-number(12345, '0,###^0', { - - + + @@ -2686,6 +2686,7 @@ format-number(12345, '0,###^0', {

Converts a string to an integer, recognizing any radix in the range 2 to 36.

+

If $value is an empty sequence, the result is an empty sequence.

The supplied $radix must be in the range 2 to 36 inclusive.

The string $value is preprocessed by stripping all whitespace characters (including internal whitespace) @@ -11461,8 +11462,8 @@ else QName("", $value) - - + + @@ -11474,8 +11475,9 @@ else QName("", $value)

Returns an xs:QName value formed by parsing an EQName.

+

If $value is an empty sequence, the result is an empty sequence.

-

Leading and trailing whitespace in $value is stripped.

+

Otherwise, leading and trailing whitespace in $value is stripped.

If the resulting $value is castable to xs:NCName, the result is fn:QName("", $value): that is, a QName in no namespace.

Otherwise, if the resulting $value is in the lexical space of xs:QName @@ -30480,8 +30482,8 @@ fold-left($input, false(), fn($result, $item, $pos) { - - + + @@ -30496,6 +30498,8 @@ fold-left($input, false(), fn($result, $item, $pos) { +

If $uri is an empty sequence, the result is an empty sequence.

+

The function parses the $uri provided, returning a map containing its constituent parts: scheme, authority components, path, etc. From ab52397c68a3d3fbc0a0a31793706f61e278356e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gr=C3=BCn?= Date: Tue, 21 May 2024 14:39:36 +0200 Subject: [PATCH 2/3] =?UTF-8?q?fn:parse-uri:=20$uri=20=E2=86=92=20$value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xpath-functions-40/src/function-catalog.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml index 8128c788f..72c0e07c2 100644 --- a/specifications/xpath-functions-40/src/function-catalog.xml +++ b/specifications/xpath-functions-40/src/function-catalog.xml @@ -30483,7 +30483,7 @@ fold-left($input, false(), fn($result, $item, $pos) { - + @@ -30498,9 +30498,9 @@ fold-left($input, false(), fn($result, $item, $pos) { -

If $uri is an empty sequence, the result is an empty sequence.

+

If $value is an empty sequence, the result is an empty sequence.

-

The function parses the $uri provided, +

The function parses the $value provided, returning a map containing its constituent parts: scheme, authority components, path, etc. In addition to parsing URIs as defined by @@ -30553,7 +30553,7 @@ fold-left($input, false(), fn($result, $item, $pos) { components is case insensitive.

Processing begins with a string that is equal - to the $uri. If the string contains + to the $value. If the string contains any backslashes (\), replace them with forward slashes (/).

@@ -30836,7 +30836,7 @@ fold-left($input, false(), fn($result, $item, $pos) {

The following map is returned:

{ - "uri": $uri, + "uri": $value, "scheme": scheme, "hierarchical": hierarchical, "authority": authority, From 05101a0f1d3c2af3b8570eece76f2646d3cd0eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gr=C3=BCn?= Date: Mon, 12 Aug 2024 13:50:28 +0200 Subject: [PATCH 3/3] Use 'return-type-ref-occurs' --- specifications/xpath-functions-40/src/function-catalog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml index 72c0e07c2..10387e649 100644 --- a/specifications/xpath-functions-40/src/function-catalog.xml +++ b/specifications/xpath-functions-40/src/function-catalog.xml @@ -30482,7 +30482,7 @@ fold-left($input, false(), fn($result, $item, $pos) { - +