|
195 | 195 | <xref target="schema-document">schema document</xref> begins by applying
|
196 | 196 | the <xref target="root">root schema</xref> to the complete instance
|
197 | 197 | document. From there, keywords known as applicators are used to determine
|
198 |
| - which additional subschemas are applied. Subschema may be applied in-place |
199 |
| - to the current location, or to a child location. The subschemas may be all |
200 |
| - or part of the keyword's value, or the keyword's value may identify one |
201 |
| - or more schemas in a way defined by the keyword. |
| 198 | + which additional schemas are applied. Such schemas may be applied in-place |
| 199 | + to the current location, or to a child location. |
202 | 200 | </t>
|
203 | 201 | <t>
|
204 |
| - Applicator keywords also define how subschema boolean |
205 |
| - <xref target="assertions">assertion</xref> |
| 202 | + The schemas to be applied may be present as subschemas comprising all or |
| 203 | + part of the keyword's value. Alternatively, an applicator may refer to |
| 204 | + a schema elsewhere in the same schema document, or in a different one. |
| 205 | + The mechanism for identifying such referred schemas is defined by the |
| 206 | + keyword. |
| 207 | + </t> |
| 208 | + <t> |
| 209 | + Applicator keywords also define how subschema or referred schema |
| 210 | + boolean <xref target="assertions">assertion</xref> |
206 | 211 | results are modified and/or combined to produce the boolean result
|
207 | 212 | of the applicator. Applicators may apply any boolean logic operation
|
208 | 213 | to the assertion results of subschemas, but MUST NOT introduce new
|
|
562 | 567 | As with the root schema, a subschema is either an object or a boolean.
|
563 | 568 | </t>
|
564 | 569 | </section>
|
| 570 | + <section title="Referred and Referring Schemas" anchor="referred"> |
| 571 | + <t> |
| 572 | + As noted in <xref target="applicators" />, an applicator keyword may |
| 573 | + refer to a schema to be applied, rather than including it as a |
| 574 | + subschema in the applicator's value. In such situations, the |
| 575 | + schema being applied is known as the referred schema, while |
| 576 | + the schema containing the applicator keyword is the referring schema. |
| 577 | + </t> |
| 578 | + <t> |
| 579 | + While root schemas and subschemas are static concepts based on a |
| 580 | + schema's position within a schema document, referred and referring |
| 581 | + schemas are dynamic. Different pairs of schemas may find themselves |
| 582 | + in various referred and referring arrangements during the evaluation |
| 583 | + of an instance against a schema. |
| 584 | + </t> |
| 585 | + <t> |
| 586 | + For some by-reference applicators, such as |
| 587 | + <xref target="ref">"$ref"</xref>, the referred schema can be determined |
| 588 | + by static analysis of the schema document. Others may take evaluation |
| 589 | + context into account, and only be resolvable in the process of evaluating |
| 590 | + with an instance. |
| 591 | + <cref> |
| 592 | + Assuming some form of dynamic reference keyword is introduced |
| 593 | + related to GitHub issue #558, this section will be updated |
| 594 | + to make a concrete reference to that keyword for clarification. |
| 595 | + </cref> |
| 596 | + </t> |
| 597 | + </section> |
565 | 598 | </section>
|
566 | 599 |
|
567 | 600 | </section>
|
|
884 | 917 | </section>
|
885 | 918 | </section>
|
886 | 919 |
|
887 |
| - <section title='Schema References With "$ref"'> |
| 920 | + <section title='Schema References With "$ref"' anchor="ref"> |
888 | 921 | <t>
|
889 | 922 | The "$ref" keyword is used to reference a schema, and provides the ability to
|
890 | 923 | validate recursive structures through self-reference.
|
|
0 commit comments