Skip to content

Optionally order when iterating on _nesting-key_ #297

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 2 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3003,7 +3003,8 @@ <h3>Algorithm</h3>
</li>
</ol>
</li>
<li id="alg-expand-resolve-nest" class="changed">For each key <var>nesting-key</var> in <var>nests</var>
<li id="alg-expand-resolve-nest" class="changed">For each key <var>nesting-key</var> in <var>nests</var>,
ordered lexicographically if {{JsonLdOptions/ordered}} is <code>true</code>:
<ol>
<li>Initialize <var>nested values</var> to the value of <var>nesting-key</var>
in <var>element</var>, ensuring that it is an <a>array</a>.</li>
Expand Down Expand Up @@ -7002,6 +7003,9 @@ <h2>Changes since Candidate Release of 12 December 2019</h2>
<li>Improved text in step <a href="#alg-expand-container-mapping-type">13.8.3.7.5</a>
to exclude the <var>expanded index</var> being `@none`.
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/264">Issue 264</a>.</li>
<li>Update step <a href="#alg-expand-resolve-nest">14</a>
to order by <var>nesting-key</var>, if `ordered` is `true`.
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/295">Issue 295</a>.</li>
<li>Move step 13.15 of the expansion algorithm up one level to step <a href="#alg-expand-resolve-nest">14</a>,
as it had accidentally been set to run for every entry in the object, rather than
after all entries had been expanded.
Expand Down
2 changes: 1 addition & 1 deletion tests/expand-manifest.html
Original file line number Diff line number Diff line change
Expand Up @@ -7455,7 +7455,7 @@ <h2>
</dl>
</dd>
<dt id='tn004'>
Test tn004 Appends nested values from all @nest aliases in term order
Test tn004 Appends nested values from all @nest aliases
</dt>
<dd>
<dl class='entry'>
Expand Down
2 changes: 1 addition & 1 deletion tests/expand-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@
}, {
"@id": "#tn004",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Appends nested values from all @nest aliases in term order",
"name": "Appends nested values from all @nest aliases",
"purpose": "Expansion using @nest",
"input": "expand/n004-in.jsonld",
"expect": "expand/n004-out.jsonld",
Expand Down