@@ -477,27 +477,27 @@ root object.
477
477
478
478
#### Dynamic Scope
479
479
480
- The dynamic scope is the ordered collection of schema objects navigated during
481
- evaluation, starting at the root and ending at the subschema under evaluation.
482
- The outermost dynamic scope is the schema object at which processing begins,
483
- even if it is not a schema resource root . The path that evaluation takes,
484
- starting from this root schema to any particular subschema (including any ` $ref `
480
+ The dynamic scope is the ordered collection of schema resources navigated during
481
+ evaluation, starting at the root and ending at the schema resource which
482
+ contains the subschema under evaluation. The outermost dynamic scope is the
483
+ schema resource at which processing begins . The path that evaluation takes,
484
+ starting from the subschema to any particular subschema (including any ` $ref `
485
485
and ` $dynamicRef ` keywords that may have been resolved), is considered the
486
486
"evaluation path".
487
487
488
488
Lexical and dynamic scopes align until a reference keyword is encountered. While
489
- following the reference moves processing from one lexical scope into a
490
- different one, from the perspective of dynamic scope, following a reference is
491
- no different from descending into a subschema present as a value . A keyword on
492
- the far side of that reference that resolves information through the dynamic
493
- scope will consider the originating side of the reference to be its dynamic
494
- parent rather than examining the local lexically enclosing parent.
489
+ following the reference moves processing from one lexical scope into a different
490
+ one, from the perspective of dynamic scope, following a reference is no
491
+ different from descending into a subschema. A keyword on the far side of the
492
+ reference that resolves information through the dynamic scope will consider the
493
+ originating side of the reference to be its dynamic parent rather than examining
494
+ the local lexically enclosing parent.
495
495
496
496
The concept of dynamic scope is primarily used with ` $dynamicRef ` and
497
497
` $dynamicAnchor ` , and should be considered an advanced feature and used with
498
498
caution when defining additional keywords. It also appears when reporting errors
499
499
and collected annotations, as it may be possible to revisit the same lexical
500
- scope repeatedly with different dynamic scopes. In such cases , it is important
500
+ scope repeatedly with different dynamic scopes. For this reason , it is important
501
501
to inform the user of the evaluation path that produced the error or annotation.
502
502
503
503
### Keyword Interactions
0 commit comments