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