-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add sections on Processing Model and Context Validation #291
Conversation
index.html
Outdated
optionally, for the context values that do not exist in |approvedContexts|, | ||
remove the |contextValue| from the `@context` property values. Set | ||
|result|.|document| to the result of running the | ||
<a data-cite="JSON-LD11-API#compaction-algorithm"> | ||
JSON-LD Compaction Algorithm</a> with the modified |inputDocument| as input. |
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.
This will need the same adjustments as VC data model PR 1535.
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.
Done in 0f234e8 ... which drastically changed the algorithm given @TallTed's changes. The previous algorithm didn't work for multiply nested documents w/ multiple contexts. The update attempts to address that use case. Please check my work @dlongley @davidlehn... I think I got all the corner cases, but need more eyes on it.
index.html
Outdated
a status ([=boolean=] |status|) | ||
</li> | ||
<li> | ||
a validated document ([=map=] |document|) |
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.
Do any errors
prevent return of a validated document
? That is, is a validated document
always returned in the map
, regardless of errors
?
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.
No, errors will result in an undefined
value for document
, which is noted in the algorithm below.
index.html
Outdated
</ol> | ||
|
||
<p> | ||
The purpose of the algorithm above is to ensure that a consuming application has |
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.
This explanation (all paragraphs of it) would be better presented before the algorithm it discusses, than following it. Making this relocation will mandate some rephrasing. It might be worthwhile to put this description into <h4>Context Validation Description</h4>
(or similar title) followed by <h4>Context Validation Algorithm</h4>
, both being within <h3>Context Validation</h4>
.
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.
Fixed in 3107ccb (without creating more sections, just moved some text around).
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.
@msporny — 3107ccb is a good start. I think lines 2312 through 2353 (using the line numbers visible at that commit) should also be moved to ~2245 (preceding the list of algorithm inputs) or possibly ~2264 (following the list of algorithm outputs). After that move, some further rephrasing may be appropriate. (Also note that there are change suggestions in flight on these sections, which I think should be made before the relocation, so the line numbers referenced here may also change before the relocation happens.)
index.html
Outdated
This section contains an algorithm that applications MUST run after running the | ||
algorithm in Section [[[#verify-proof]]] or Section | ||
[[[#verify-proof-sets-and-chains]]], when validating a [=conforming secured | ||
document=]. This algorithm takes a document ([=map=] |inputDocument|) and a set |
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.
What is the reason for this order? Instinctively, my choice would be to first check whether the document is all right in terms of JSON-LD, ie, run the context validation, before running it through the validating steps (that may also involve running RDFC on the RDF graphs generated by the JSON-LD processing).
(Note if the order is reversed, it also has to be updated in the new processing model section.)
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.
Fixed in 3107ccb.
There's a lot of repeated text, here and in w3c/vc-data-model#1535, which needs similar if not identical changes (which suggestions from myself and others do not currently reflect), possibly being adjusted to be said in one place, and referenced in the other. |
@TallTed wrote:
See the reasoning here: w3c/vc-data-model#1535 (comment) |
Co-authored-by: Dave Longley <dlongley@digitalbazaar.com> Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
index.html
Outdated
and expresses them using the `@context` property. | ||
</li> | ||
<li> | ||
Selects a cryptography suite that meets the needs of the use case, such as |
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.
Selects a cryptography suite that meets the needs of the use case, such as | |
Selects one or more cryptography suites that meet the needs of the use case, such as |
<li> | ||
zero or more warnings ([=list=] of [=ProblemDetails=] |warnings|) | ||
</li> |
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.
This isn't used in the algorithm.
<li> | |
zero or more warnings ([=list=] of [=ProblemDetails=] |warnings|) | |
</li> |
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, but it's left in there so that implementations can add warnings if they would like (and there is a standards interface for them doing so. I'll add some text to note that implementations MAY add additional warnings/errors.
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.
Fixed in 04584e7.
index.html
Outdated
<p> | ||
Yet another valid approach would be for a transmitting application to | ||
<a data-cite="JSON-LD11-API#compaction-algorithm">compact</a> a document to | ||
exactly what a receiving application requests, omitting additional |
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.
How does a receiving application request (a) specific context(s)?
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.
Fixed by explaining that it can happen via the query protocol.
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Normative, multiple reviews, changes requested and made, no objections, merging. |
which might be undefined. | ||
</li> | ||
<li> | ||
If |contextValue| does not deeply equal |expectedContext|, then if any subtree in |
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.
Slight mixup here in the grammar fixes, this step should read "or if" not "then if".
This PR attempts to address issue #288 by adding sections on Processing Model and Context Validation.
Preview | Diff