Skip to content

Update expansion to expand _input type_ before comparing with @type. #275

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 6 commits into from
Dec 26, 2019
Merged
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
23 changes: 16 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2487,10 +2487,13 @@ <h3>Algorithm</h3>
and `false` for <var>propagate</var>.</li>
</ol>
</li>
<li>Initialize two empty <a class="changed">maps</a>, <var>result</var>
<li id="alg-expand-initialize-vars">Initialize two empty <a class="changed">maps</a>, <var>result</var>
<span class="changed">and <var>nests</var>.
Initialize <var>input type</var> to the last value of the first <a>entry</a> in <var>element</var>
Initialize <var>input type</var> to expansion of the last value of the first <a>entry</a> in <var>element</var>
expanding to <code>@type</code> (if any), ordering <a>entries</a> lexicographically by key</span>.
Both the key and value of the matched entry are expanded using the
<a href="#iri-expansion">IRI Expansion algorithm</a>,
passing <var>active context</var>, and <code>true</code> for <var>vocab</var>.
</li>
<li id="alg-expand-each-key-value">
For each <var>key</var> and <var>value</var> in <var>element</var>,
Expand Down Expand Up @@ -2605,7 +2608,8 @@ <h3>Algorithm</h3>
</li>
<li>If <var>expanded property</var> is <code>@value</code>:
<ol>
<li class="changed">If <var>input type</var> is <code>@json</code>,
<li id="alg-expand-type-json" class="changed">If
<var>input type</var> is <code>@json</code>,
set <var>expanded value</var> to <var>value</var>.
If <a>processing mode</a> is `json-ld-1.0`,
an <a data-link-for="JsonLdErrorCode">invalid value object value</a>
Expand Down Expand Up @@ -2758,10 +2762,10 @@ <h3>Algorithm</h3>
<var>active property</var>, <var>value</var> for <var>element</var>,
<span class="changed">and the {{JsonLdOptions/frameExpansion}}
and {{JsonLdOptions/ordered}} flags</span>.</li>
<li>Unless <var>expanded value</var> is <code>null</code>,
<span class="changed">and <var>expanded property</var> is `@value`,
and <var>input type</var> is `@json`</span>, set
the <var>expanded property</var> <a>entry</a> of <var>result</var> to
<li id="alg-expand-expanded-property-to-result">Unless <var>expanded value</var> is <code>null</code>,
<span class="changed"><var>expanded property</var> is <code>@value</code>,
and <var>input type</var> is not <code>@json</code>,</span>
set the <var>expanded property</var> <a>entry</a> of <var>result</var> to
<var>expanded value</var>.</li>
<li>Continue with the next <var>key</var> from <var>element</var>.</li>
</ol>
Expand Down Expand Up @@ -6942,6 +6946,11 @@ <h2>Changes since Candidate Release of 12 December 2019</h2>
of the <a href="#expansion-algorithm">Expansion algorithm</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>Updated step <a href="#alg-expand-initialize-vars">12</a>
of the
<a href="#expansion-algorithm">Expansion algorithm</a>
<var>input type</var> to use the expanded value.
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/269">Issue 269</a>.</li>
</ul>
</section>

Expand Down