317
317
option is <code>true</code>. If there are no data rows in the CSV, the
318
318
value will be an empty sequence.</p></fos:meaning>
319
319
</fos:field>
320
- <fos:field name="get" type="function(xs:positiveInteger, (xs:positiveInteger | xs:string)) as xs:string? " required="true">
320
+ <fos:field name="get" type="function(xs:positiveInteger, (xs:positiveInteger | xs:string)) as xs:string" required="true">
321
321
<fos:meaning><p>A function providing ready access to a given field in a given
322
322
row. The <code>get</code> function has signature:</p>
323
- <eg>function($row as xs:integer , $column as union (xs:string, xs:integer )) as xs:string? </eg>
323
+ <eg>function($row as xs:positiveInteger , $column as (xs:positiveInteger | xs:string )) as xs:string</eg>
324
324
<p>The function takes two arguments: the first is an
325
325
integer giving the row number (1-based), the second
326
326
identifies a column either by its name or by its 1-based
330
330
the function call <code>$csv?get($R, $C)</code>, where <code>$C</code>
331
331
is an integer, returns the value of <code>$csv?rows[$R] => array:get($C, fn { "" })</code>,
332
332
and the function call <code>$csv?get($R, $K)</code>, where <code>$K</code>
333
- is a string, returns the value of <code>$csv?get($R, $csv?column-numbers ($K))</code>.</p>
333
+ is a string, returns the value of <code>$csv?get($R, $csv?column-index ($K))</code>.</p>
334
334
335
335
<p>The properties of the function are as follows:</p>
336
336
<glist>
344
344
</gitem>
345
345
<gitem>
346
346
<label>Signature</label>
347
- <def><p><code>(xs:positiveInteger, (xs:positiveInteger | xs:string)) => xs:string? </code></p></def>
347
+ <def><p><code>(xs:positiveInteger, (xs:positiveInteger | xs:string)) => xs:string</code></p></def>
348
348
</gitem>
349
349
<gitem>
350
350
<label>Non-local variable bindings</label>
@@ -26072,26 +26072,10 @@ return json-to-xml($json, $options)]]></eg>
26072
26072
</fos:value>
26073
26073
</fos:values>
26074
26074
</fos:option>
26075
- <!--<fos:option key="normalize-newlines">
26076
- <fos:meaning>Determines whether CR and CRLF character sequences
26077
- are treated as equivalent to NL characters.</fos:meaning>
26078
- <fos:type>xs:boolean</fos:type>
26079
- <fos:default>false</fos:default>
26080
- <fos:values>
26081
- <fos:value value="false">No normalization takes place.
26082
- </fos:value>
26083
- <fos:value value="true">The character sequences CR (<char>U+000D</char>)
26084
- and CRLF (<char>U+000D</char>, <char>U+000A</char>) are treated as equivalent to the
26085
- character NL (<char>U+000A</char>), except when they appear within a quoted field.
26086
- The normalization is done prior to recognition of row delimiters, and happens
26087
- whether or not NL is used as the row delimiter.
26088
- </fos:value>
26089
- </fos:values>
26090
- </fos:option>-->
26091
26075
<fos:option key="header">
26092
26076
<fos:meaning>Determines whether the first row of the CSV should be treated as a list
26093
26077
of column names, or whether column names are being supplied by the caller.
26094
- The value must either be a single boolean, or a sequence of one or more strings.
26078
+ The value must either be a single boolean, or a sequence of zero or more strings.
26095
26079
</fos:meaning>
26096
26080
<fos:type>item()*</fos:type>
26097
26081
<fos:default>false</fos:default>
@@ -26100,7 +26084,7 @@ return json-to-xml($json, $options)]]></eg>
26100
26084
first row of the CSV data.</fos:value>
26101
26085
<fos:value value="false">Column names are not available; all references
26102
26086
to columns are by ordinal position.</fos:value>
26103
- <fos:value value="xs:string+ ">Supplies explicit names for the columns. The <var>N</var>th
26087
+ <fos:value value="xs:string* ">Supplies explicit names for the columns. The <var>N</var>th
26104
26088
name in the list applies to the <var>N</var>th column after any filtering or rearrangement.
26105
26089
A zero-length string can be used when there is a column that requires no name.
26106
26090
</fos:value>
@@ -26448,7 +26432,7 @@ return (
26448
26432
the CSV string. An instance of
26449
26433
<code>xs:string</code> whose length is exactly one.
26450
26434
Defaults to a single newline character (<char>U+000A</char>).</fos:meaning>
26451
- <fos:type>xs:string+ </fos:type>
26435
+ <fos:type>xs:string</fos:type>
26452
26436
<fos:default>char('\n')</fos:default>
26453
26437
</fos:option>
26454
26438
<fos:option key="quote-character">
@@ -26459,14 +26443,14 @@ return (
26459
26443
</fos:option>
26460
26444
<fos:option key="trim-whitespace">
26461
26445
<fos:meaning>Determines whether leading and trailing whitespace
26462
- is removed from the content of fields.</fos:meaning>
26446
+ is removed from the content of unquoted fields.</fos:meaning>
26463
26447
<fos:type>xs:boolean</fos:type>
26464
26448
<fos:default>false</fos:default>
26465
26449
<fos:values>
26466
- <fos:value value="false">Fields will be returned with any leading or trailing
26450
+ <fos:value value="false">Unquoted fields will be returned with any leading or trailing
26467
26451
whitespace intact.
26468
26452
</fos:value>
26469
- <fos:value value="true">Fields will be returned with leading or trailing
26453
+ <fos:value value="true">Unquoted fields will be returned with leading or trailing
26470
26454
whitespace removed, and all other whitespace preserved.
26471
26455
</fos:value>
26472
26456
</fos:values>
@@ -26712,7 +26696,9 @@ return document {
26712
26696
}</csv>
26713
26697
}]]></eg>
26714
26698
26715
- <p>The namespace prefix used in the names of elements (or its absence) is
26699
+ <p>The elements in the returned XML are in the namespace
26700
+ <code>http://www.w3.org/2005/xpath-functions</code>;
26701
+ the namespace prefix that is used (or its absence) is
26716
26702
<termref def="implementation-dependent"/>.</p>
26717
26703
26718
26704
<p>If the function is called twice with the same arguments, it is <termref
0 commit comments