@@ -547,8 +547,8 @@ determined at runtime.
547
547
548
548
While custom identifier keywords are possible, extension designers should take
549
549
care not to disrupt the functioning of core keywords. For example, the
550
- ` $dynamicAnchor ` keyword in this specification limits its IRI resolution effects
551
- to the matching ` $dynamicRef ` keyword , leaving the behavior of ` $ref `
550
+ ` $dynamicAnchor ` keyword in this specification limits its resolution behavior
551
+ to matching ` $dynamicRef ` keywords , leaving the behavior of ` $ref `
552
552
undisturbed.
553
553
554
554
### Applicators {#applicators}
@@ -980,18 +980,9 @@ result is undefined, and even if documented will not be interoperable.
980
980
981
981
#### Schema References {#references}
982
982
983
- Several keywords can be used to reference a schema which is to be applied to the
984
- current instance location. ` $ref ` and ` $dynamicRef ` are applicator keywords,
985
- applying the referenced schema to the instance.
986
-
987
- As the values of ` $ref ` and ` $dynamicRef ` are IRI References, this allows the
988
- possibility to externalise or divide a schema across multiple files, and
989
- provides the ability to validate recursive structures through self-reference.
990
-
991
- The resolved IRI produced by these keywords is not necessarily a network
992
- locator, only an identifier. A schema need not be downloadable from the address
993
- if it is a network-addressable URL. Implementations which can access the network
994
- SHOULD default to operating offline.
983
+ ` $ref ` and ` $dynamicRef ` can be used to reference a schema which is to be
984
+ applied to the current instance location. As such, they are considered
985
+ applicators, applying the referenced schema to the instance.
995
986
996
987
##### Direct References with ` $ref ` {#ref}
997
988
@@ -1006,22 +997,28 @@ Resolved against the current IRI base, it produces the IRI of the schema to
1006
997
apply. This resolution is safe to perform on schema load, as the process of
1007
998
evaluating an instance cannot change how the reference resolves.
1008
999
1000
+ The resolved IRI produced by ` $ref ` is not necessarily a network
1001
+ locator, only an identifier. A schema need not be downloadable from the address
1002
+ if it is a network-addressable URL. Implementations which can access the network
1003
+ SHOULD default to operating offline.
1004
+
1009
1005
##### Dynamic References with ` $dynamicRef ` {#dynamic-ref}
1010
1006
1011
1007
The ` $dynamicRef ` keyword is an applicator that allows for deferring the full
1012
1008
resolution until runtime, at which point it is resolved each time it is
1013
1009
encountered while evaluating an instance.
1014
1010
1015
1011
Together with ` $dynamicAnchor ` , ` $dynamicRef ` implements a cooperative extension
1016
- mechanism that is primarily useful to extend recursive schemas, where
1012
+ mechanism that is primarily useful to to create open schemas, where
1017
1013
` $dynamicRef ` defines the extension point and ` $dynamicAnchor ` defines the
1018
1014
target.
1019
1015
1020
- The value of the ` $dynamicRef ` property MUST be a valid
1021
- [ plain name fragment] ( #fragments ) .[ ^ 3 ]
1016
+ The value of the ` $dynamicRef ` property MUST be formatted as a valid
1017
+ [ IRI plain name fragment] ( #fragments ) .[ ^ 3 ]
1022
1018
1023
- [ ^ 3 ] : ` $dynamicAnchor ` defines the anchor with plain text, e.g. ` foo ` ; the
1024
- ` $dynamicRef ` that references it uses a URI fragment syntax, e.g. ` #foo ` .
1019
+ [ ^ 3 ] : ` $dynamicAnchor ` defines the anchor with plain text, e.g. ` foo ` . Although
1020
+ the value of ` $dynamicRef ` is not an IRI fragment, for historical reasons, the
1021
+ value still uses an IRI fragment syntax, e.g. ` #foo ` .
1025
1022
1026
1023
Resolution of ` $dynamicRef ` begins by identifying the outermost schema
1027
1024
resource in the [ dynamic scope] ( #scopes ) which defines a matching
0 commit comments