Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dnovatchev/qtspecs into d…
Browse files Browse the repository at this point in the history
…n-ranks

I  - Integration
  • Loading branch information
dnovatchev committed Jan 22, 2025
2 parents 777d4e0 + c2fa683 commit 63f1835
Show file tree
Hide file tree
Showing 37 changed files with 992 additions and 306 deletions.
8 changes: 7 additions & 1 deletion etc/status-general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,10 @@
<!-- ************************************************************************** -->
&patent-policy-paragraph;

</status>
<note role="dedication" id="dedication">
<p>The publications of this community group
<loc href="../xquery-40/xpath-40.html#dedication">are dedicated</loc> to our co-chair,
Michael Sperberg-McQueen (1954–2024).</p>
</note>

</status>
Binary file removed schema/common/.DS_Store
Binary file not shown.
Binary file removed schema/common/mathml/.DS_Store
Binary file not shown.
Binary file removed schema/common/mathml/mathml1/.DS_Store
Binary file not shown.
Binary file removed schema/common/mathml/mathml2/.DS_Store
Binary file not shown.
Binary file removed schema/common/mathml/mathml2/html/.DS_Store
Binary file not shown.
Binary file removed schema/common/mathml/mathml2/iso8879/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file removed schema/common/mathml/mathml2/mathml/.DS_Store
Binary file not shown.
Binary file removed schema/common/mathml/mathml3/.DS_Store
Binary file not shown.
Binary file removed schema/common/rddl/.DS_Store
Binary file not shown.
Binary file removed schema/common/svg10/.DS_Store
Binary file not shown.
Binary file removed schema/common/svg11/.DS_Store
Binary file not shown.
Binary file removed schema/common/svg11/templates/.DS_Store
Binary file not shown.
Binary file removed schema/common/xhtml10/.DS_Store
Binary file not shown.
Binary file removed schema/common/xhtml11/.DS_Store
Binary file not shown.
Binary file removed schema/common/xmlschema/.DS_Store
Binary file not shown.
Binary file removed schema/common/xmlspec/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions specifications/EXPath/binary/src/binary-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ for transition to Proposed Recommendation. </p>'>
in their <term>History</term> notes. Comments are invited, in the form of GitHub
issues at <loc href="https://github.com/qt4cg/qtspecs"
>https://github.com/qt4cg/qtspecs</loc>.</p>

<note role="dedication" id="dedication">
<p>The publications of this community group
<loc href="../xquery-40/xpath-40.html#dedication">are dedicated</loc> to our co-chair,
Michael Sperberg-McQueen (1954–2024).</p>
</note>
</status>

<langusage>
Expand Down
6 changes: 6 additions & 0 deletions specifications/EXPath/file/src/file-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ for transition to Proposed Recommendation. </p>'>
in their <term>History</term> notes. Comments are invited, in the form of GitHub
issues at <loc href="https://github.com/qt4cg/qtspecs"
>https://github.com/qt4cg/qtspecs</loc>.</p>

<note role="dedication" id="dedication">
<p>The publications of this community group
<loc href="../xquery-40/xpath-40.html#dedication">are dedicated</loc> to our co-chair,
Michael Sperberg-McQueen (1954–2024).</p>
</note>
</status>

<langusage>
Expand Down
19 changes: 12 additions & 7 deletions specifications/grammar-40/xpath-grammar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral
<g:string>)</g:string>
<g:choice>
<g:ref name="UnbracedActions"/>
<g:ref name="BracedActions"/>
<g:ref name="BracedAction"/>
</g:choice>
</g:production>

Expand All @@ -1344,21 +1344,21 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral
<g:ref name="ExprSingle"/>
</g:production>

<g:production name="BracedActions">
<g:ref name="ThenAction"/>
<g:zeroOrMore>
<g:production name="BracedAction">
<g:ref name="EnclosedExpr"/>
<!--<g:zeroOrMore>
<g:ref name="ElseIfAction"/>
</g:zeroOrMore>
<g:optional>
<g:ref name="ElseAction"/>
</g:optional>
</g:optional>-->
</g:production>

<g:production name="ThenAction">
<g:ref name="EnclosedExpr"/>
</g:production>

<g:production name="ElseIfAction">
<!--<g:production name="ElseIfAction">
<g:string>else</g:string>
<g:string>if</g:string>
<g:string>(</g:string>
Expand All @@ -1370,7 +1370,7 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral
<g:production name="ElseAction">
<g:string>else</g:string>
<g:ref name="EnclosedExpr"/>
</g:production>
</g:production>-->

<!-- [ start TryCatchExpr -->

Expand Down Expand Up @@ -1553,6 +1553,11 @@ ErrorVal ::= "$" VarName
</g:sequence>
</g:postfix>
</g:level>
<g:level>
<g:binary name="PipelineExpr" condition="&gt; 1" if="xpath40 xquery40">
<g:string>-></g:string>
</g:binary>
</g:level>
<g:level>
<g:postfix name="ArrowExpr" prefix-seq-type="*" condition="&gt; 1" if="xpath40 xquery40">
<g:sequence>
Expand Down
7 changes: 6 additions & 1 deletion specifications/image-sources/anyAtomicType.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,15 @@
</ulist>
</item>
<item role="primitive">
<p role="last">
<p role="item">
<phrase>time</phrase>
</p>
</item>
<item role="primitive">
<p role="last">
<phrase>untypedAtomic</phrase>
</p>
</item>
</ulist>
</item>
</ulist>
Expand Down
8 changes: 7 additions & 1 deletion specifications/image-sources/anyType.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,17 @@
</p>
</item>
<item role="user-defined">
<p role="last">
<p role="item">
<phrase>user-defined union types</phrase>
<phrase role="kind"> (user-defined)</phrase>
</p>
</item>
<item role="user-defined">
<p role="last">
<phrase>user-defined enumeration types</phrase>
<phrase role="kind"> (user-defined)</phrase>
</p>
</item>
</ulist>
</item>
</ulist>
Expand Down
29 changes: 29 additions & 0 deletions specifications/image-sources/item-types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,40 @@
<item role="abstract function">
<p><phrase>function(*)</phrase><phrase role="kind"> (function item)</phrase></p>
<ulist>
<item role="function user-defined">
<p>
<phrase>user-defined function item types</phrase>
<phrase role="kind"> (user-defined)</phrase>
</p>
</item>

<item role="abstract function">
<p><phrase>array(*)</phrase><phrase role="kind"> (function item)</phrase></p>
<ulist>
<item role="function user-defined">
<p>
<phrase>user-defined array types</phrase>
<phrase role="kind"> (user-defined)</phrase>
</p>
</item>
</ulist>
</item>
<item role="abstract function">
<p><phrase>map(*)</phrase><phrase role="kind"> (function item)</phrase></p>
<ulist>
<item role="function user-defined">
<p>
<phrase>user-defined map types</phrase>
<phrase role="kind"> (user-defined)</phrase>
</p>
</item>
<item role="function user-defined">
<p>
<phrase>user-defined record types</phrase>
<phrase role="kind"> (user-defined)</phrase>
</p>
</item>
</ulist>
</item>
</ulist>
</item>
Expand Down
58 changes: 37 additions & 21 deletions specifications/xpath-datamodel-40/src/xpath-datamodel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ therefore can also be contained within sequences.</p>

<p>The <code>dm:iterate-sequence</code> accessor calls the supplied <code>$action</code>
function once for each item in <code>$input</code>, in order,
and returns the sequence concenation of the results. The <code>$action</code> function
and returns the sequence concatenation of the results. The <code>$action</code> function
is called with two arguments. The first argument is an item in <code>$input</code>,
and the second is the 1-based ordinal position of the item within <code>$input</code>.</p>

Expand Down Expand Up @@ -1511,40 +1511,49 @@ must equal the function’s arity.
<changes>
<change issue="1335" date="2024-07-20">Constructors are added, and the single accessor function
is now an iterator over the key/value pairs in the map.</change>
<change issue="1651" PR="1703" date="2025-01-14">Ordered maps are introduced.</change>
</changes>

<p><termdef term="map item" id="dt-map-item">A <term>map item</term>
is a value that represents a map (in other languages this is sometimes
called a hash, dictionary, or associative array).</termdef>
A map is logically a collection of
key/value pairs. Each key in the map is unique (there is no other key
to which it is equal) and has associated with it a value that is a sequence
is an item that represents an ordered sequence of key/value pairs,
in which the keys are unique.</termdef>
In other languages this is sometimes
called a hash, dictionary, or associative array.
The keys are atomic items, and each key in the map is unique (there is no other key
to which it is equal). Each key is associated with a value that may be any sequence
of zero or more items. There is no uniqueness constraint on
values. The semantics of equality are described in
values, only on keys. The semantics of equality when comparing keys are described in
<xspecref spec="FO40" ref="func-atomic-equal"/>.</p>



<note>

<note>
<p>Maps have no intrinsic identity separate from their content. A map can be given
a transient identity, represented by an <code>id</code> property in its label, by applying the
<code>fn:pin</code> function. This property is expected to be used in defining
operations for deep update of maps.
</p>
</note>



<p><termdef id="dt-entry-order" term="entry order">The order of entries in a map
is referred to as <term>entry order</term>.</termdef>
The entry order affects the result of functions such as <function>map:keys</function>
and <function>map:for-each</function>, and also determines the order of entries
when a map is serialized using the JSON output method.</p>


<p>Constructor and accessor functions for maps are defined in the following sections.</p>

<div4 id="dm-empty-map">
<head><code>empty-map</code> Constructor</head>
<example role="signature">
<proto class="dm" name="empty-map" return-type="map(*)" returnSeq="no"/>
<proto class="dm" name="empty-map" return-type="map(*)" returnSeq="no"/>
</example>

<p>The <code>dm:empty-map</code> constructor returns a map containing no key/value pairs.</p>

<p>The function is exposed in XPath as an empty map constructor, which may be written <code>{}</code>
or <code>map {}</code>.</p>
<note><p>In XPath an empty map may be constructed using the expression <code>{}</code>
or <code>map {}</code>.</p></note>
</div4>

<div4 id="dm-map-put">
Expand All @@ -1565,7 +1574,13 @@ values. The semantics of equality are described in
<item><p>One key/value pair whose key is <code>$key</code> and whose associated value is <code>$value</code>.</p></item>
</ulist>

<p>The function is exposed in XPath through the function <code>map:put</code>.</p>

<p>The <termref def="dt-entry-order"/> in the returned
map reflects the <termref def="dt-entry-order"/> in the supplied <code>$map</code>. If the key of
the new entry was present in <code>$map</code> then the new entry replaces that entry retaining
its current position; otherwise, the new entry is added after all existing entries.</p>

<p>The function is exposed in XPath through the function <function>map:put</function>.</p>
</div4>

<div4 id="dm-iterate-map">
Expand All @@ -1578,13 +1593,14 @@ values. The semantics of equality are described in
</proto>
</example>

<p>The <function>dm:iterate-map</function> accessor calls the supplied <code>$action</code>
function once for each key/value pair in <code>$map</code>, in implementation-dependent order,
and returns the sequence concenation of the results.</p>
<p>The <code>dm:iterate-map</code> accessor calls the supplied <code>$action</code>
function once for each key/value pair in <code>$map</code>,
and returns the sequence concenation of the results. The order in which entries
are processed is the <termref def="dt-entry-order"/> of the map.</p>

<p>The function is exposed in XPath most directly through the function <code>map:for-each</code>, but
it also underpins all other functions giving access to maps, such as <code>map:size</code>,
<code>map:contains</code>, and <code>map:get</code>.</p>
<p>The function is exposed in XPath most directly through the function <function>map:for-each</function>, but
it also underpins all other functions giving access to maps, such as <function>map:size</function>,
<function>map:contains</function>, and <function>map:get</function>.</p>

</div4>

Expand Down
Loading

0 comments on commit 63f1835

Please sign in to comment.