Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1592 Rework rules for selecting a layout #1596

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions specifications/xpath-functions-40/src/function-catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25712,36 +25712,36 @@ return json-to-xml($json, $options)]]></eg>
"record", "sequence", "mixed", "xml"))</fos:type>
<fos:default>map{}</fos:default>
</fos:option>
<fos:option key="disable-layouts">
<fos:meaning>A list of layouts that will not be used for elements unless they are
selected explicitly. (Note that <code>mixed</code> and <code>xml</code>
layout cannot be disabled.)</fos:meaning>
<fos:type>enum("empty", "empty-plus", "simple", "simple-plus", "list", "list-plus",
"record", "sequence")*</fos:type>
<fos:default>()</fos:default>
</fos:option>
</fos:options>





<p>The principles for conversion from elements to maps are described
in <specref ref="element-layouts"/>.</p>
in <specref ref="id-element-layouts"/>, and the rules for selecting
an element layout for each element are given in <specref ref="id-selecting-element-layout"/>.</p>


<p>In general, an element node maps to a key-value pair in which the key represents the element name, and the
corresponding value represents the attributes and children of the element. In the case of a top-level element
(a node directly supplied in <code>$nodes</code>), the result will be a singleton map containing this key-value
(a node directly supplied in <code>$elements</code>), the result will be a singleton map containing this key-value
pair as its only entry. In the case of a descendant element, the key-value pair for a child element will be added
to the content representing its parent element, in a way that depends on the parent element's layout.</p>

<p>The representation of other kinds of node depends on the layout chosen for its parent element.</p>


</fos:rules>
<fos:errors>
<p>A dynamic error is raised if the selected layout rules require atomization of an element that does not have a typed
value (typically because it has been validated against an element-only content model): <errorref
class="TY" code="0012"/>.</p>
</fos:errors>
<!--<fos:notes>
<p>The namespace URI and local name of all elements and attributes is available in the JSON output.
Prefixes are not retained, and namespaces that are declared but not used are not retained.</p>

</fos:notes>-->

<fos:examples>
<fos:example>
<fos:test>
Expand Down Expand Up @@ -25803,9 +25803,9 @@ return json-to-xml($json, $options)]]></eg>
</fos:test>-->
</fos:example>
</fos:examples>
<fos:history>
<fos:version version="4.0">Proposed for 4.0; initial review on 2023-06-27.</fos:version>
</fos:history>
<fos:changes>
<fos:change><p>New in 4.0.</p></fos:change>
</fos:changes>
</fos:function>


Expand Down
Loading
Loading