-
Notifications
You must be signed in to change notification settings - Fork 1
hrefPointers wording improvements #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a companion to "anchorPointer", as they use the same mechanism for adjusting locations within the instance. While "anchorPointer" adjusts the context, "hrefPointers" adjust how template variables are resolved. "hrefPointers" replaces and is much more functional than the preprocessing rules that were removed in draft wright-01. Those rules only allowed adjusting to use the sub-instance as a whole intead of individual properties or elements. "hrefPointers" supports that as well as using data from any containg or sub-instance.
Also note limitations of the hrefPointer system.
This example simplifies the concepts by getting rid of the confusing variable-length URIs and just acknowledging that the parent URI for the root node does not make any sense. This sort of situation is addressed elsewhere in the spec, so add an xref to it. The reworked example uses two links: one to illustrate standard resolution (not appearing in "hrefPointers") alongside of an "hrefPointers" adjustment using an absolute pointer, and then another illustratig both absolute and relative pointers.
Also add commas, making the phrasing clearer.
jsonschema-hyperschema.xml
Outdated
@@ -679,8 +679,8 @@ | |||
</t> | |||
<figure> | |||
<preamble> | |||
Recall that a Relative JSON Pointer which is not also a regular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, neither of these is correct. regular JSON Pointers are also valid Relative JSON Pointers. I had it backwards. Yours is correct but not what I meant :-P I'll fix it and update the main PR (possibly by merging this as-is and then amending it, need to read the paragraph re-write below and think on it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although really there's some debate over this. Some people seem to think that it's necessar to say "JSON Pointer or Relative JSON Pointer" which seems horribly verbose to me. Not sure what to do with it. I was just going to change the Relative JSON Pointer spec to say what I want it to say and re-submit it as draft-andrews-relative-json-pointer-00, probably :-P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this wasn't clear for me. The approach you took in json-schema-org#386 is better, thanks.
34e0400
to
54d22c2
Compare
Closing as (interesting) changes got incorporated in the upstream PR. |
Instead of pointing at typos or suggesting clarifications on json-schema-org#386 , I thought that I could just do the changes myself and submit a PR again your working branch. So if you agree and merge this PR, json-schema-org#386 will then get the new commits.