-
Notifications
You must be signed in to change notification settings - Fork 165
This adds a @nest member to term definitions used for _transparent properties_
#453
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3f035c7
This adds a `@nest` member to term definitions used for _transparent …
gkellogg 01ce975
Merge branch 'master' into issue-246-nesting2
gkellogg fbae572
Move order of "invalid @nest value" to be along with other invalid ke…
gkellogg bc97d88
Merge remote-tracking branch 'origin/master' into issue-246-nesting2
gkellogg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -903,7 +903,7 @@ <h3>Algorithm</h3> | |
| </li> | ||
| <li>If <em>value</em> contains the key <code>@reverse</code>: | ||
| <ol class="algorithm"> | ||
| <li>If <em>value</em> contains an <code>@id</code>, member, an | ||
| <li>If <em>value</em> contains <code>@id</code> or <code>@nest</code>, members, an | ||
| <a data-link-for="JsonLdErrorCode">invalid reverse property</a> | ||
| error has been detected and processing is aborted.</li> | ||
| <li>If the value associated with the <code>@reverse</code> key | ||
|
|
@@ -1019,9 +1019,18 @@ <h3>Algorithm</h3> | |
| of <em>definition</em> to <em>language</em>.</li> | ||
| </ol> | ||
| </li> | ||
| <li class="changed">If <em>value</em> contains the key <code>@nest</code>: | ||
| <ol class="algorithm"> | ||
| <li>Initialize <em>nest</em> to the value associated with the | ||
| <code>@nest</code> key, which must be a <a>string</a> and | ||
| must not be a keyword other than <code>@nest</code>. Otherwise, an | ||
| <a data-link-for="JsonLdErrorCode">invalid @nest value</a> | ||
| error has been detected and processing is aborted.</li> | ||
| </ol> | ||
| </li> | ||
| <li>If the value contains any key other than <code>@id</code>, | ||
| <code>@reverse</code>, <code>@container</code>, | ||
| <code>@context</code>, or <code>@type</code>, an | ||
| <code>@context</code>, <code class="changed">@nest</code>, or <code>@type</code>, an | ||
| <a data-link-for="JsonLdErrorCode">invalid term definition</a> error has | ||
| been detected and processing is aborted.</li> | ||
| <li>Set the <a>term definition</a> of <em>term</em> in | ||
|
|
@@ -1269,7 +1278,7 @@ <h3>Algorithm</h3> | |
| passing <a>active context</a> and the value of the | ||
| <code>@context</code> key as <a>local context</a>.</li> | ||
| <li>Initialize an empty <a>JSON object</a>, <em>result</em>.</li> | ||
| <li>For each <em>key</em> and <em>value</em> in <em>element</em>, | ||
| <li id="alg-expand-each-key-value">For each <em>key</em> and <em>value</em> in <em>element</em>, | ||
| ordered lexicographically by <em>key</em>: | ||
| <ol class="algorithm"> | ||
| <li>If <em>key</em> is <code>@context</code>, continue to | ||
|
|
@@ -1417,6 +1426,10 @@ <h3>Algorithm</h3> | |
| <li>Continue with the next <em>key</em> from <em>element</em>.</li> | ||
| </ol> | ||
| </li> | ||
| <li class="changed">If <em>expanded property</em> is <code>@nest</code>, | ||
| add <em>key</em> to <em>nests</em>, initializing it to an empty <a>array</a>, | ||
| if necessary. | ||
| Continue with the next <em>key</em> from <em>element</em>.</li> | ||
| <li class="changed">When the <code>frame expansion</code> flag is set, | ||
| if <em>expanded property</em> is any other | ||
| framing keyword (<code>@explicit</code>, <code>@default</code>, | ||
|
|
@@ -1545,6 +1558,22 @@ <h3>Algorithm</h3> | |
| member of <em>result</em>.</li> | ||
| </ol> | ||
| </li> | ||
| <li class="changed">For each key <em>nesting-key</em> in <em>nests</em> | ||
| <ol class="algorithm"> | ||
| <li>Set <em>nested values</em> to the value of <em>nesting-key</em> | ||
| in <em>element</em>, ensuring that it is an <a>array</a>.</li> | ||
| <li>For each <em>nested value</em> in <em>nested values</em>: | ||
| <ol class="algorithm"> | ||
| <li>If <em>nested value</em> is not a <a>JSON object</a>, or any key within | ||
| <em>nested value</em> expands to <code>@value</code>, an | ||
| <a data-link-for="JsonLdErrorCode">invalid @nest value</a> error | ||
| has been detected and processing is aborted.</li> | ||
| <li>Recursively repeat <a href="#alg-expand-each-key-value">step 7</a> | ||
| using <em>nested value</em> for <em>element</em>.</li> | ||
| </ol> | ||
| </li> | ||
| </ol> | ||
| </li> | ||
| </ol> | ||
| </li> | ||
| <li>If <em>result</em> contains the key <code>@value</code>: | ||
|
|
@@ -1928,7 +1957,22 @@ <h3>Algorithm</h3> | |
| <em>expanded value</em> for <em>value</em>, | ||
| <code>true</code> for <em>vocab</em>, and | ||
| <em>inside reverse</em>.</li> | ||
| <li>If <em>result</em> does not have the key that equals | ||
| <li class="changed">If the <a>term definition</a> for <em>item active property</em> | ||
| in the <em>active context</em> has a <code>@nest</code> | ||
| member, that value (<em>nest term</em>) must be | ||
| <code>@nest</code>, or a <a>term definition</a> in the | ||
| <em>active context</em> that expands to <code>@nest</code>, | ||
| otherwise an <a data-link-for="JsonLdErrorCode">invalid @nest | ||
| value</a> error has been detected, and processing is aborted. | ||
| If <em>result</em> does not have the key that equals <em>nest | ||
| term</em>, initialize it to an empty JSON object (<em>nest | ||
| object</em>). If <em>nest object</em> does not have the key | ||
| that equals <em>item active property</em>, set this key's | ||
| value in <em>nest object</em> to an empty | ||
| <a>array</a>.Otherwise, if the key's value is not an | ||
| <a>array</a>, then set it to one containing only the | ||
| value.</li> | ||
| <li>Otherwise, if <em>result</em> does not have the key that equals | ||
| <em>item active property</em>, set this key's value in | ||
| <em>result</em> to an empty <a>array</a>. Otherwise, if | ||
| the key's value is not an <a>array</a>, then set it | ||
|
|
@@ -1948,6 +1992,16 @@ <h3>Algorithm</h3> | |
| <em>expanded item</em> for <em>value</em>, | ||
| <code>true</code> for <em>vocab</em>, and | ||
| <em>inside reverse</em>.</li> | ||
| <li class="changed">If the <a>term definition</a> for <em>item active property</em> | ||
| in the <em>active context</em> has a <code>@nest</code> | ||
| member, that value (<em>nest term</em>) must be | ||
| <code>@nest</code>, or a <a>term definition</a> in the | ||
| <em>active context</em> that expands to <code>@nest</code>, | ||
| otherwise an <a data-link-for="JsonLdErrorCode">invalid @nest | ||
| value</a> error has been detected, and processing is aborted. | ||
| Set <em>nest result</em> to the value of <em>nest term</em> in <em>result</em>, | ||
| initializing it to a new <a>JSON object</a>, if necessary; otherwise | ||
| set <em>nest result</em> to <em>result</em>.</li> | ||
| <li>Initialize <em>container</em> to <code>null</code>. If there | ||
| is a <a>container mapping</a> for | ||
| <em>item active property</em> in <a>active context</a>, | ||
|
|
@@ -1985,7 +2039,7 @@ <h3>Algorithm</h3> | |
| </ol> | ||
| </li> | ||
| <li>Otherwise, <em>item active property</em> must not be a key | ||
| in <em>result</em> because there cannot be two | ||
| in <em class="changed">nest result</em> because there cannot be two | ||
| <a>list objects</a> associated | ||
| with an <a>active property</a> that has a | ||
| <a>container mapping</a>; a | ||
|
|
@@ -1998,9 +2052,9 @@ <h3>Algorithm</h3> | |
| <code>@index</code>: | ||
| <ol class="algorithm"> | ||
| <li>If <em>item active property</em> is not a key in | ||
| <em>result</em>, initialize it to an empty <a>JSON object</a>. | ||
| <em class="changed">nest result</em>, initialize it to an empty <a>JSON object</a>. | ||
| Initialize <em>map object</em> to the value of <em>item active property</em> | ||
| in <em>result</em>.</li> | ||
| in <em class="changed">nest result</em>.</li> | ||
| <li>If <em>container</em> is <code>@language</code> and | ||
| <em>compacted item</em> contains the key | ||
| <code>@value</code>, then set <em>compacted item</em> | ||
|
|
@@ -2030,9 +2084,9 @@ <h3>Algorithm</h3> | |
| <li>If <em>item active property</em> is not a key in | ||
| <em>result</em> then add the key-value pair, | ||
| (<em>item active property</em>-<em>compacted item</em>), | ||
| to <em>result</em>.</li> | ||
| to <em class="changed">nest result</em>.</li> | ||
| <li>Otherwise, if the value associated with the key that | ||
| equals <em>item active property</em> in <em>result</em> | ||
| equals <em>item active property</em> in <em class="changed">nest result</em> | ||
| is not an <a>array</a>, set it to a new | ||
| <a>array</a> containing only the value. Then | ||
| append <em>compacted item</em> to the value if | ||
|
|
@@ -4058,6 +4112,7 @@ <h4>JsonLdErrorCode</h4> | |
| "invalid language mapping", | ||
| "invalid language-tagged string", | ||
| "invalid language-tagged value", | ||
| "invalid @nest value", | ||
| "invalid local context", | ||
| "invalid remote context", | ||
| "invalid reverse property", | ||
|
|
@@ -4134,6 +4189,8 @@ <h4>JsonLdErrorCode</h4> | |
| associated language tag was detected.</dd> | ||
| <dt><dfn>invalid local context</dfn></dt> | ||
| <dd>In invalid <a>local context</a> was detected.</dd> | ||
| <dt class="changed"><dfn>invalid @nest value</dfn></dt> | ||
|
||
| <dd class="changed">An invalid value for <code>@nest</code> has been found.</dd> | ||
| <dt><dfn>invalid remote context</dfn></dt> | ||
| <dd>No valid context document has been found for a referenced, | ||
| remote context.</dd> | ||
|
|
@@ -4208,6 +4265,12 @@ <h2>Changes since 1.0 Recommendation of 16 January 2014</h2> | |
| <li>A new <a href="#merge-node-maps" class="sectionRef"></a> is required | ||
| for framing, to create a single graph from the <a data-lt="default graph">default</a> | ||
| and <a>named graphs</a>.</li> | ||
| <li>An <a>expanded term definition</a> can now have an | ||
| <code>@nest</code> property, which identifies a term expanding to | ||
| <code>@nest</code> which is used for containing properties using the same | ||
| <code>@nest</code> mapping. When expanding, the values of a property | ||
| expanding to <code>@nest</code> are treated as if they were contained | ||
| within the enclosing <a>node object</a> directly.</li> | ||
| </ul> | ||
| </section> | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
move up sorted with other @ values
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.
Good call, the
@was added later. Should be good now.