Skip to content

Commit

Permalink
Add explanation for design of schema type record
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhkay committed Nov 10, 2024
1 parent c221067 commit 907bfa2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions specifications/xpath-functions-40/src/xpath-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7964,6 +7964,17 @@ return <table>

<?record-description schema-type-record?>

<note>
<p>Simple properties of a schema type that can be expressed as strings or booleans are
represented in this record structure directly as atomic field values, while complex properties
whose values are themselves types (for example, <code>base-type</code> and <code>primitive-type</code>)
are represented as functions. This is done partly to make it easier for implementations to compute
complex properties on demand rather than in advance, and partly to ensure that the overall
structure is always acyclic. For example, the primitive type of <code>xs:decimal</code> is itself
<code>xs:decimal</code>, and if this were represented as a field value without a guarding function,
serialization of the map using the JSON output method would not terminate.</p>
</note>

<div2 id="functions-returning-type-information">
<head>Functions returning type information</head>

Expand Down

0 comments on commit 907bfa2

Please sign in to comment.