Skip to content

Commit

Permalink
Merge pull request #1231 from ChristianGruen/1193
Browse files Browse the repository at this point in the history
1193 Parsing Functions: Empty input
  • Loading branch information
ndw authored Sep 3, 2024
2 parents 16defb8 + 05101a0 commit 58638a0
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions specifications/xpath-functions-40/src/function-catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2673,8 +2673,8 @@ format-number(12345, '0,###^0', {
</fos:function>
<fos:function name="parse-integer" prefix="fn">
<fos:signatures>
<fos:proto name="parse-integer" return-type="xs:integer">
<fos:arg name="value" type="xs:string" example="'12345'"/>
<fos:proto name="parse-integer" return-type="xs:integer?">
<fos:arg name="value" type="xs:string?" example="'12345'"/>
<fos:arg name="radix" type="xs:integer?" default="10"/>
</fos:proto>
</fos:signatures>
Expand All @@ -2687,6 +2687,7 @@ format-number(12345, '0,###^0', {
<p>Converts a string to an integer, recognizing any radix in the range 2 to 36.</p>
</fos:summary>
<fos:rules>
<p>If <code>$value</code> is an empty sequence, the result is an empty sequence.</p>

<p>The supplied <code>$radix</code> must be in the range 2 to 36 inclusive.</p>
<p>The string <code>$value</code> is preprocessed by stripping all whitespace characters (including internal whitespace)
Expand Down Expand Up @@ -11462,8 +11463,8 @@ else QName("", $value)</eg>
</fos:function>
<fos:function name="parse-QName" prefix="fn" diff="add" at="B">
<fos:signatures>
<fos:proto name="parse-QName" return-type="xs:QName">
<fos:arg name="value" type="xs:string"/>
<fos:proto name="parse-QName" return-type="xs:QName?">
<fos:arg name="value" type="xs:string?"/>
</fos:proto>
</fos:signatures>
<fos:properties>
Expand All @@ -11475,8 +11476,9 @@ else QName("", $value)</eg>
<p>Returns an <code>xs:QName</code> value formed by parsing an EQName.</p>
</fos:summary>
<fos:rules>
<p>If <code>$value</code> is an empty sequence, the result is an empty sequence.</p>

<p>Leading and trailing whitespace in <code>$value</code> is stripped.</p>
<p>Otherwise, leading and trailing whitespace in <code>$value</code> is stripped.</p>
<p>If the resulting <code>$value</code> is castable to <code>xs:NCName</code>,
the result is <code>fn:QName("", $value)</code>: that is, a QName in no namespace.</p>
<p>Otherwise, if the resulting <code>$value</code> is in the lexical space of <code>xs:QName</code>
Expand Down Expand Up @@ -30504,8 +30506,8 @@ fold-left($input, false(), fn($result, $item, $pos) {

<fos:function name="parse-uri" prefix="fn" diff="add">
<fos:signatures>
<fos:proto name="parse-uri" return-type-ref="uri-structure-record">
<fos:arg name="uri" type="xs:string"/>
<fos:proto name="parse-uri" return-type-ref="uri-structure-record" return-type-ref-occurs="?">
<fos:arg name="value" type="xs:string?"/>
<fos:arg name="options" type="map(*)?" default="{}"/>
</fos:proto>
</fos:signatures>
Expand All @@ -30520,7 +30522,9 @@ fold-left($input, false(), fn($result, $item, $pos) {
</fos:summary>

<fos:rules>
<p>The function parses the <code>$uri</code> provided,
<p>If <code>$value</code> is an empty sequence, the result is an empty sequence.</p>

<p>The function parses the <code>$value</code> provided,
returning a map containing its constituent parts: scheme,
authority components, path, etc.
In addition to parsing URIs as defined by <bibref ref="rfc3986"/>
Expand Down Expand Up @@ -30573,7 +30577,7 @@ fold-left($input, false(), fn($result, $item, $pos) {
components is case insensitive.</p>

<p>Processing begins with a <emph>string</emph> that is equal
to the <code>$uri</code>. If the <emph>string</emph> contains
to the <code>$value</code>. If the <emph>string</emph> contains
any backslashes (<code>\</code>), replace them with forward
slashes (<code>/</code>).</p>

Expand Down Expand Up @@ -30863,7 +30867,7 @@ fold-left($input, false(), fn($result, $item, $pos) {
<p>The following map is returned:</p>

<eg>{
"uri": $uri,
"uri": $value,
"scheme": <emph>scheme</emph>,
"hierarchical": <emph>hierarchical</emph>,
"authority": <emph>authority</emph>,
Expand Down

0 comments on commit 58638a0

Please sign in to comment.