|
666 | 666 | Lexical and dynamic scopes align until a reference keyword
|
667 | 667 | is encountered. While following the reference keyword moves processing
|
668 | 668 | from one lexical scope into a different one, from the perspective
|
669 |
| - of dynamic scope, following reference is no different from descending |
| 669 | + of dynamic scope, following a reference is no different from descending |
670 | 670 | into a subschema present as a value. A keyword on the far side of
|
671 | 671 | that reference that resolves information through the dynamic scope
|
672 | 672 | will consider the originating side of the reference to be their
|
|
795 | 795 | For some by-reference applicators, such as
|
796 | 796 | <xref target="ref">"$ref"</xref>, the referenced schema can be determined
|
797 | 797 | by static analysis of the schema document's lexical scope. Others,
|
798 |
| - such as "$dynamicRef" (with "$dynamicAnchor"), may make use of dynamic |
799 |
| - scoping, and therefore only be resolvable in the process of evaluating |
800 |
| - the schema with an instance. |
| 798 | + such as "$dynamicRef" (with "$dynamicAnchor"), are only resolvable in the context |
| 799 | + of the dynamic scope. |
801 | 800 | </t>
|
802 | 801 | </section>
|
803 | 802 | </section>
|
|
1445 | 1444 | <t>
|
1446 | 1445 | The value of the "$ref" keyword MUST be a string which is a URI-Reference.
|
1447 | 1446 | Resolved against the current URI base, it produces the URI of the schema
|
1448 |
| - to apply. This resolution is safe to perform on schema load, as the |
1449 |
| - process of evaluating an instance cannot change how the reference resolves. |
| 1447 | + to apply. This resolution is safe to perform on schema load as neither other |
| 1448 | + schemas nor the instance can change how the reference resolves. |
1450 | 1449 | </t>
|
1451 | 1450 | </section>
|
1452 | 1451 |
|
|
1464 | 1463 | </t>
|
1465 | 1464 | <t>
|
1466 | 1465 | The value of the "$dynamicRef" keyword MUST be a string which is a URI-Reference.
|
1467 |
| - Resolved against the URI base, it produces the URI of the schema to apply. This |
1468 |
| - resolution is not safe to perform on schema load, as the process of evaluating an |
1469 |
| - instance can change how the reference resolves. |
| 1466 | + Resolved against the dynamically determined URI base, it produces the URI of the |
| 1467 | + schema to apply. This resolution is not safe to perform on schema load because |
| 1468 | + the dynamic scope is not known. It is safe to perform this resolution as part of |
| 1469 | + a compile step where all schemas involved have been loaded. |
1470 | 1470 | </t>
|
1471 | 1471 | <t>
|
1472 | 1472 | For a full example using these keyword, see appendix
|
|
0 commit comments