Skip to content

Commit 065263a

Browse files
committed
Wording improvements from PR review
Define the condition for usin hrefSchema more clearly (I hope). Use consistent language around "locations" in a schema rather than introduce a new term "data sources" which is not defined. Attempt a better explanation of how to find values in the instance. I'm not entirely sure it's successful but at least it's different.
1 parent ac20697 commit 065263a

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

jsonschema-hyperschema.xml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -974,13 +974,15 @@
974974
<preamble>
975975
This is the high-level algorithm as pseudocode. "T" comes from either
976976
"href" or "anchor" within the LDO, or from "base" in a containing schema.
977-
Pseudocode for each step follows.
977+
Pseudocode for each step follows. "anchorOrHref" indicates which of the
978+
two started the process (since "base" is always resolved in order to finish
979+
resolving one or the other of those keywords).
978980
</preamble>
979981
<artwork>
980982
<![CDATA[
981983
templateData = populateDataFromInstance(T, ldo, instance)
982984
983-
if resolving "href" or "base" for "href" and ldo.hrefSchema exists:
985+
if anchorOrHref == "href" and ldo.hrefSchema exists:
984986
inputData = acceptInput(ldo, instance, templateData)
985987
for varname in inputData:
986988
templateData[varname] = inputData[varname]
@@ -997,13 +999,20 @@ R = rfc6570ResolutionAlgorithm(T, templateData)
997999

9981000
<section title="Populating template data from the instance">
9991001
<t>
1000-
This step looks at various data sources in the instance:
1002+
This step looks at various locations in the instance for variable values.
1003+
For each variable:
10011004
<list style="numbers">
1002-
<t>Use "templatePointers" to find values where appropriate</t>
1003-
<t>Look in the immediate instance for remaining values</t>
10041005
<t>
1005-
Either way, if there is a value there, put it in the
1006-
template resolution data set
1006+
Use "templatePointers" to find a value if the variable
1007+
appears in that keyword's value
1008+
</t>
1009+
<t>
1010+
Otherwise, look for a property names matching the variable in
1011+
the instance location to which the link is attached
1012+
</t>
1013+
<t>
1014+
In either case, if there is a value at the location, put it in
1015+
the template resolution data set
10071016
</t>
10081017
</list>
10091018
</t>

0 commit comments

Comments
 (0)