Skip to content

Commit

Permalink
Merge pull request #1668 from michaelhkay/Minor_copy-edits
Browse files Browse the repository at this point in the history
Minor copy edits (no issue raised)
  • Loading branch information
ndw authored Jan 7, 2025
2 parents 390c43a + 20cac13 commit 5eaa883
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 24 deletions.
1 change: 1 addition & 0 deletions specifications/xpath-functions-40/src/fos.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<xs:element name="record-type">
<xs:complexType>
<xs:sequence>
<xs:element ref="fos:summary" minOccurs="0" maxOccurs="1"/>
<xs:element ref="fos:field" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
Expand Down
29 changes: 24 additions & 5 deletions specifications/xpath-functions-40/src/function-catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
</fos:global-variables>

<fos:record-type id="key-value-pair" extensible="true">
<fos:summary>
<p>This record type represents a key and its associated value within an entry of a map.</p>
</fos:summary>
<fos:field name="key" type="xs:anyAtomicType" required="true">
<fos:meaning>
<p>A key suitable for use in a map entry.</p>
Expand All @@ -31,6 +34,9 @@
</fos:record-type>

<fos:record-type id="uri-structure-record" extensible="true">
<fos:summary>
<p>This record type represents the components of a URI.</p>
</fos:summary>
<fos:field name="uri" type="xs:string?" required="false">
<fos:meaning>
<p>The original URI. This element is returned by <function>fn:parse-uri</function>,
Expand Down Expand Up @@ -87,6 +93,9 @@
</fos:record-type>

<fos:record-type id="schema-type-record" extensible="true">
<fos:summary>
<p>This record type represents the properties of a simple or complex type in a schema.</p>
</fos:summary>
<fos:field name="name" type="xs:QName?" required="true">
<fos:meaning>
<p>The name of the type. Empty in the case of an anonymous type. Corresponds to
Expand Down Expand Up @@ -187,6 +196,9 @@
</fos:record-type>

<fos:record-type id="load-xquery-module-record" extensible="false">
<fos:summary>
<p>This record type is used to hold the result of the <function>fn:load-query-module</function> function.</p>
</fos:summary>
<fos:field name="variables" type="map(xs:QName, item()*)" required="true">
<fos:meaning>
<p>This map (<var>V</var> ) contains one entry for each public
Expand Down Expand Up @@ -218,6 +230,9 @@


<fos:record-type id="parsed-csv-structure-record" extensible="false">
<fos:summary>
<p>This record type is used to hold the result of the <function>fn:parse-csv</function> function.</p>
</fos:summary>
<fos:field name="columns" type="xs:string*" required="true">
<fos:meaning>
<p>This entry holds a sequence of strings containing column names.
Expand All @@ -226,7 +241,7 @@

<ulist>
<item><p>With <code>"header":false()</code> (which is the default),
then the value is an empty sequence.</p></item>
the value of this entry is an empty sequence.</p></item>
<item><p>With <code>"header":true()</code>, the value is a sequence
of strings taken from the first row of the data. The strings have
leading and trailing whitespace trimmed, regardless of the value of the
Expand Down Expand Up @@ -255,7 +270,7 @@

<ulist>
<item><p>With <code>"header":false()</code> (which is the default),
the value is an empty map.</p></item>
the value of this entry is an empty map.</p></item>
<item><p>With <code>"header":true()</code>, the map
contains entries based on the contents of the first row of the data.
The strings have
Expand Down Expand Up @@ -393,6 +408,10 @@


<fos:record-type id="random-number-generator-record" extensible="true">
<fos:summary>
<p>This record type is used to represent the result of a call on
the <function>fn:random-number-generator</function> function.</p>
</fos:summary>
<fos:field name="number" type="xs:double" required="true">
<fos:meaning><p>An <code>xs:double</code> greater than or equal
to zero (0.0e0), and less than one (1.0e0).</p></fos:meaning>
Expand Down Expand Up @@ -14451,7 +14470,7 @@ return error((), 'Duplicate IDs found: ' || string-join($ids, ', '))</eg>
</fos:example>
</fos:examples>
<fos:changes>
<fos:change><p>New in 4.0</p></fos:change>
<fos:change issue="123" PR="614"><p>New in 4.0</p></fos:change>
<fos:change issue="628" PR="987"><p>The order of results is now prescribed;
it was previously implementation-dependent.</p></fos:change>
</fos:changes>
Expand Down Expand Up @@ -20136,7 +20155,7 @@ serialize(
</fos:example>
</fos:examples>
<fos:changes>
<fos:change issue="850" PR="956" date="2023-01-10"><p>New in 4.0</p></fos:change>
<fos:change issue="74 850" PR="259 956" date="2023-01-10"><p>New in 4.0</p></fos:change>
</fos:changes>
</fos:function>
<fos:function name="position" prefix="fn">
Expand Down Expand Up @@ -22274,7 +22293,7 @@ declare function transitive-closure (
</fos:example>
</fos:examples>
<fos:changes>
<fos:change issue="554 754" PR="761" date="2023-10-18"><p>New in 4.0</p></fos:change>
<fos:change issue="518 554 754" PR="521 761" date="2023-10-18"><p>New in 4.0</p></fos:change>
</fos:changes>
</fos:function>

Expand Down
38 changes: 28 additions & 10 deletions specifications/xpath-functions-40/src/xpath-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3325,6 +3325,12 @@ It is recommended that implementers consult <bibref ref="UNICODE-TR18"/> for inf

<div3 id="flags">
<head>Flags</head>
<changes>
<change issue="999" PR="1022" date="2024-02-20">
Regular expressions can include comments (starting and ending with <code>#</code>)
if the <code>c</code> flag is set.
</change>
</changes>
<p>All these functions provide an optional parameter, <code>$flags</code>,
to set options for the interpretation of the regular expression. The
parameter accepts a <code>xs:string</code>, in which individual letters
Expand Down Expand Up @@ -6934,9 +6940,8 @@ correctly in all browsers, depending on the system configuration.</emph></p>-->
appears within a quoted string, and whether or not <char>U+000A</char> is the chosen
row delimiter.</p></item>
<item><p>Row delimiters other than newline are recognized.</p></item>
<item><p>Field delimiters other than comma (<code>","</code>) are recognized.</p></item>
<item><p>Quote characters other than the double quotation mark (<code>'"'</code>)
are recognized.</p></item>
<item><p>Field delimiters other than <char>U+002C</char> are recognized.</p></item>
<item><p>Quote characters other than <char>U+0022</char> are recognized.</p></item>
<item><p>Non-ASCII characters are recognized.</p></item>
</ulist>

Expand Down Expand Up @@ -9226,18 +9231,25 @@ return <table>
in the function library:</p>

<ulist>
<item><p>The expression <code>{}</code> creates an empty map. This is equivalent to the
<item><p>The expression <code>{}</code> creates an empty map
(see <xspecref spec="XP40" ref="id-map-constructors"/>). This is equivalent to the
effect of the data model primitive <code>dm:empty-map()</code>. Using user-visible functions
the same can be achieved by calling <code>map:build(())</code>, <code>map:of-pairs(())</code>,
or <code>map:merge(())</code>.</p></item>
the same can be achieved by calling <function>map:build</function>, <function>map:of-pairs</function>,
or <function>map:merge</function>, supplying an empty sequence as the argument.</p></item>
<item><p>The map constructor <code>{ <var>K1</var> : <var>V1</var>, <var>K2</var> : <var>V2</var>,
... , <var>K/n</var> : <var>V/n</var> }</code> is equivalent to
<code>map:merge((map:entry(<var>K1</var>, <var>V1</var>), map:entry(<var>K1</var>, <var>V1</var>), ..., map:entry(<var>K/n</var>, <var>V/n</var>)), {"duplicates":"reject"})</code></p></item>
<item><p>The lookup expression <code>$map?*</code> is equivalent to <code>map:values($map)</code>.</p></item>
<item><p>The lookup expression <code>$map?*</code>
(see <xspecref spec="XP40" ref="id-lookup"/>) is equivalent to <code>map:values($map)</code>.</p></item>
<item><p>The lookup expression <code>$map?K</code>, where <var>K</var> is a key value, is equivalent to
<code>map:get($map, <var>K</var>)</code></p></item>
<item><p>The expression <code>for key $k value $v in $map return <var>EXPR</var></code> is equivalent to the function
<item><p>The expression <code>for key $k value $v in $map return <var>EXPR</var></code>
(see <xspecref spec="XQ40" ref="id-xquery-for-clause"/> and
<xspecref spec="XP40" ref="id-for-expressions"/>)
is equivalent to the function
call <code>map:for-each($map, fn($k, $v) { <var>EXPR</var> })</code>.</p></item>
<item><p>Maps can be filtered using the construct <code>$map?[<var>predicate</var>]</code>
(see <xspecref spec="XP40" ref="id-filter-maps-and-arrays"/>).</p></item>

</ulist>

Expand Down Expand Up @@ -9424,7 +9436,8 @@ return <table>
<ulist>
<item><p>An empty array can be constructed using either of the expressions
<code>[]</code> or <code>array{}</code>. The effect is the same as the data model primitive
<code>dm:empty-array(())</code>. Using user-visible functions it can be achieved
<code>dm:empty-array(())</code> (see <xspecref spec="XP40" ref="id-array-constructors"/>).
Using user-visible functions it can be achieved
by calling <code>array:build(())</code> or <code>array:of-members(())</code>.</p></item>
<item><p>The expression <code>array { $sequence }</code> constructs an array whose members
are the items in <code>$sequence</code>. Every member of this array will
Expand All @@ -9444,7 +9457,12 @@ return <table>
<item><p>Similarly, applying the array as a function, <code>$array($N)</code>,
is also equivalent to <code>array:get($array, [$N])</code></p></item>
<item><p>The expression <code>for member $m in $array return <var>EXPR</var></code>
is equivalent to <code>array:for-each($array, fn($m){ <var>EXPR</var> })</code>.</p></item>
is equivalent to <code>array:for-each($array, fn($m){ <var>EXPR</var> })</code>
(see <xspecref spec="XQ40" ref="id-xquery-for-clause"/> and
<xspecref spec="XP40" ref="id-for-expressions"/>).</p></item>

<item><p>Arrays can be filtered using the construct <code>$array?[<var>predicate</var>]</code>
(see <xspecref spec="XP40" ref="id-filter-maps-and-arrays"/>).</p></item>
</ulist>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@
<xsl:message expand-text="yes">Record type {.} has no name</xsl:message>
</xsl:if>
<xsl:variable name="record" select="$target" as="element(fos:record-type)"/>

<xsl:apply-templates select="$record/fos:summary/node()"/>

<!--<example role="record" id="{$record/@id}-narrative">
<record>
<xsl:for-each select="$record/fos:field">
Expand Down
24 changes: 15 additions & 9 deletions specifications/xquery-40/src/expressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2969,7 +2969,7 @@ would raise an error because it has an <code>id</code> child whose value is not
<p>An example of an implausible expression is <code>@code/text()</code>. This expression
will always evaluate to an empty sequence, because attribute nodes cannot have text
node children. The semantics of the expression are well defined, but it is likely
that the user writing this expression intended something different; if they wanted to an
that the user writing this expression intended something different: if they wanted to write an
expression that evaluated to an empty sequence, there would be easier ways to write it.</p>

<p>Where an expression is classified (by rules in this specification) as being
Expand Down Expand Up @@ -4565,8 +4565,11 @@ declare variable $orange-fruit as my:fruit := "orange";
<change issue="107" PR="286" date="2023-01-17">
Element and attribute tests of the form <code>element(N)</code>
and <code>attribute(N)</code> now allow <code>N</code> to be any <code>NameTest</code>,
including a wildcard. The forms <code>element(A|B)</code> and <code>attribute(A|B)</code>
are also allowed.
including a wildcard.
</change>
<change issue="23" PR="606" date="2023-01-17">
Element and attribute tests of the form <code>element(A|B)</code>
and <code>attribute(A|B)</code> are now allowed.
</change>
<change>
Setting the default namespace for elements and types to the special value
Expand Down Expand Up @@ -4893,8 +4896,11 @@ in the following two situations:
<change issue="107" PR="286" date="2023-01-17">
Element and attribute tests of the form <code>element(N)</code>
and <code>attribute(N)</code> now allow <code>N</code> to be any <code>NameTest</code>,
including a wildcard. The forms <code>element(A|B)</code> and <code>attribute(A|B)</code>
are also allowed.
including a wildcard.
</change>
<change issue="23" PR="606" date="2023-01-17">
Element and attribute tests of the form <code>element(A|B)</code>
and <code>attribute(A|B)</code> are now allowed.
</change>
</changes>

Expand Down Expand Up @@ -5279,7 +5285,7 @@ name.</p>
</div4>

<div4 id="id-map-test">
<head>Map Type</head>
<head>Map Types</head>
<scrap headstyle="show">
<head/>
<prodrecap id="MapType" ref="MapType"/>
Expand Down Expand Up @@ -5456,7 +5462,7 @@ name.</p>


<div4 id="id-record-test" diff="add" at="A">
<head>Record Type</head>
<head>Record Types</head>

<changes>
<change>
Expand Down Expand Up @@ -5715,7 +5721,7 @@ declare record Particle (
</div4>

<div4 id="id-array-test">
<head>Array Type</head>
<head>Array Types</head>

<scrap>
<head/>
Expand Down Expand Up @@ -22655,7 +22661,7 @@ return $rectangle =?> area()</eg>

<note>
<p>The effect of these rules is as follows, where the <emph>validated element</emph> means
either the operand node or (if the operand node is a document node) its element child.:
either the operand node or (if the operand node is a document node) its element child:
<ulist>
<item>
<p>If <nt def="ValidationMode"
Expand Down

0 comments on commit 5eaa883

Please sign in to comment.