Skip to content
Draft
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
180 changes: 68 additions & 112 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ <h2>RDF Serialization/Deserialization</h2>
<p>The <a>active context</a> consists of:</p>
<ul>
<li>the active <a>term definitions</a> which specify how
keys and values have to be interpreted (<del cite="#change_api_638"><a>array</a></del><ins cite="#change_api_638"><a>map</a></ins> of <a>term definitions</a>),</li>
keys and values have to be interpreted (<a>map</a> of <a>term definitions</a>),</li>
<li>the current <dfn data-lt="context-base-iri" data-lt-noDefault>base IRI</dfn> (<a>IRI</a>),</li>
<li class="changed">the <dfn>original base URL</dfn> (<a>IRI</a>),</li>
<li class="changed">an <dfn data-lt="context-inverse" data-lt-noDefault>inverse context</dfn> (<a>inverse context</a>),</li>
Expand All @@ -1094,7 +1094,7 @@ <h2>RDF Serialization/Deserialization</h2>
used when a non-propagated <a>context</a> is defined.</li>
</ul>

<p>Each <a>term definition</a><ins cite="#change_api_638">'s value</ins> consists of:</p>
<p>Each <a>term definition</a>'s value consists of:</p>
<ul>
<li>an <dfn>IRI mapping</dfn> (<a>IRI</a>),</li>
<li class="changed">a <dfn>prefix flag</dfn> (<a>boolean</a>),</li>
Expand Down Expand Up @@ -1681,10 +1681,10 @@ <h3>Algorithm</h3>
<li>Set the <a>term definition</a> of <var>term</var> in
<var>active context</var> to <var>definition</var> and the
value associated with <var>defined</var>'s <a>entry</a> <var>term</var> to
<code>true</code><del cite="#change_3"> and return</del>.</li>
<code>true</code>.</li>
</ol>
</li>
<li><ins cite="#change_3">Otherwise, if</ins><del cite="#change_3">If</del> <var>value</var> contains the <a>entry</a> <code>@id</code> and its value
<li>Otherwise, if <var>value</var> contains the <a>entry</a> <code>@id</code> and its value
does not equal <var>term</var>:
<ol>
<li id="ctd-id-null">If the <code>@id</code> <a>entry</a> of <var>value</var>
Expand Down Expand Up @@ -2016,11 +2016,9 @@ <h3>Algorithm</h3>
If the <var>active context</var> has a <a>default language</a>,
set <var>default language</var> to the <a>default language</a> from the <var>active context</var>
<span class="changed">normalized to lower case</span>.
<ins cite="#change_pr639">
If the <var>active context</var> has a <a>default base direction</a>,
concatenate its value to <var>default language</var>,
separated by an underscore (`"_"`).
</ins>
If the <var>active context</var> has a <a>default base direction</a>,
concatenate its value to <var>default language</var>,
separated by an underscore (`"_"`).
</li>
<li>For each key <a>term</a> and value <a>term definition</a> in
the <var>active context</var>, ordered by shortest <a>term</a>
Expand Down Expand Up @@ -2133,32 +2131,11 @@ <h3>Algorithm</h3>
</ol>
</li>
<li id="alg-inv-defaul-base-dir" class="changed">
<ins cite="#change_pr639"><em>(this step was removed by a <a href="#change_pr639">candidate correction</a>)</em></ins>
<del cite="#change_pr639">
Otherwise, if <var>active context</var> has a
<a>default base direction</a>:
<ol>
<li>Initialize a variable <var>lang dir</var>
with the concatenation of <var>default language</var> and <a>default base direction</a>,
separate by an underscore (`"_"`),
normalized to lower case.</li>
<li>If <var>language map</var> does not have a <var>lang dir</var> <a>entry</a>,
create one and set its value to the <a>term</a>
being processed.</li>
<li>If <var>language map</var> does not have an `@none` <a>entry</a>,
create one and set its value to the <a>term</a>
being processed.</li>
<li>If <var>type map</var> does not have an `@none` <a>entry</a>,
create one and set its value to the <a>term</a>
being processed.</li>
</ol>
</del>
<em>(this step was removed by a <a href="#change_pr639">candidate correction</a>)</em>
</li>
Comment on lines 2133 to 2135
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this list item be fully removed now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so

<li>Otherwise:
<ol>
<li>If <var>language map</var> does not have a <var>default language</var> <a>entry</a>,<del cite="#change_pr639">
<span class="changed">(after being normalized to lower case)</span>,
</del>
<li>If <var>language map</var> does not have a <var>default language</var> <a>entry</a>,
create one and set its value to the <a>term</a>
being processed.</li>
<li>If <var>language map</var> does not have an <code>@none</code>
Expand Down Expand Up @@ -3113,15 +3090,11 @@ <h3>Algorithm</h3>
For more information, refer to <a href="https://github.com/w3c/json-ld-api/issues/380">issue 380</a>.</p>
</div>
Recursively repeat steps
<ins cite="#change_1">
<a href="#alg-expand-property-scoped-context">3</a>,
<a href="#alg-expand-property-scoped-context2">8</a>,
</ins>
<a href="#alg-expand-property-scoped-context">3</a>,
<a href="#alg-expand-property-scoped-context2">8</a>,
<a href="#alg-expand-each-key-value">13</a>,
and <a href="#alg-expand-resolve-nest">14</a> using
<ins cite="#change_1">
<var>nesting-key</var> for <var>active property</var>, and
</ins>
<var>nesting-key</var> for <var>active property</var>, and
<var>nested value</var> for <var>element</var>.
<div class="note">Steps <a href="#alg-expand-property-scoped-context">3</a>
and <a href="#alg-expand-property-scoped-context2">8</a>
Expand Down Expand Up @@ -3918,7 +3891,7 @@ <h3>Algorithm</h3>
</div>
<ol>
<li id="alg-compact-12_8_9_6_1">Reinitialize <var>container key</var> by <a>IRI compacting</a>
<var>index key</var><ins cite="#change_2"> after first <a>IRI expanding</a> it</ins>.</li>
<var>index key</var> after first <a>IRI expanding</a> it.</li>
<li>Set <var>map key</var> to the first value of <var>container key</var> in <var>compacted item</var>, if any.</li>
<li id="alg-compact-12_8_9_6_3">If there are remaining values in <var>compacted item</var>
for <var>container key</var>, use <a>add value</a> to
Expand Down Expand Up @@ -5504,8 +5477,8 @@ <h3>Algorithm</h3>
<var>converted value</var> to <code>true</code> if the
<a>lexical form</a>

of <var>value</var> matches <code>"true"</code><ins cite="#change_5"> or <code>"1"</code></ins>, or <code>false</code>
if it matches <code>"false"</code><ins cite="#change_5"> or <code>"0"</code></ins>.
of <var>value</var> matches <code>"true"</code> or <code>"1"</code>, or <code>false</code>
if it matches <code>"false"</code> or <code>"0"</code>.
</ins>
If it matches neither,
set <var>type</var> to <code>xsd:boolean</code>.</li>
Expand All @@ -5515,30 +5488,25 @@ <h3>Algorithm</h3>
<code>xsd:double</code> and its
<a>lexical form</a>
is a valid <code>xsd:integer</code> or <code>xsd:double</code>
according to [[XMLSCHEMA11-2]]<del cite="#change_5">,
set <var>converted value</var>
to the result of converting the
<a>lexical form</a>
to a JSON <a>number</a>.
</del><ins cite="#change_5">:
<ol>
<li>
Attempt to convert the <a>lexical form</a> to a <a>JSON number</a>
according to the
[[RFC8785]] <a data-cite="RFC8785#name-serialization-of-numbers">
JSON Serialization Scheme (JCS) 3.2.2.3 Serialization of Numbers
</a> procedure.
</li>
<li>
If the conversion is successful, set <var>converted value</var>
to its result.
</li>
<li>
Otherwise, set <var>type</var> to <a>datatype IRI</a>
of <var>value</var>.
</li>
</ol>
</ins>
according to [[XMLSCHEMA11-2]]:
<ol>
<li>
Attempt to convert the <a>lexical form</a> to a <a>JSON number</a>
according to the
[[RFC8785]] <a data-cite="RFC8785#name-serialization-of-numbers">
JSON Serialization Scheme (JCS) 3.2.2.3 Serialization of Numbers
</a> procedure.
</li>
<li>
If the conversion is successful, set <var>converted value</var>
to its result.
</li>
<li>
Otherwise, set <var>type</var> to <a>datatype IRI</a>
of <var>value</var>.
</li>
</ol>

</li>
</ol>
</li>
Expand Down Expand Up @@ -5788,11 +5756,11 @@ <h3>Algorithm</h3>
<p>For more information, refer to <a href="https://github.com/w3c/json-ld-api/issues/605">issue 605</a>.</p>
</div>

<ins cite="#change_7"><p>Methods resolving a {{Promise}} with the <a>internal representation</a>
<p>Methods resolving a {{Promise}} with the <a>internal representation</a>
MUST either
map it to the datatype used by the implementation, as described in <a href="#internal-representation-in-implementations" class="sectionRef"></a>,
or serialize it to JSON (or another appropriate serialization format)
as described in <a href="#serialization-and-deserialization" class="sectionRef"></a>.</p></ins>
as described in <a href="#serialization-and-deserialization" class="sectionRef"></a>.</p>

<pre class="idl">
/*
Expand Down Expand Up @@ -5898,9 +5866,7 @@ <h3>Algorithm</h3>
to the provided <var>context</var>.</li>
</ol>
</li>
<li id="idl-compact-step-10">Resolve the <var>promise</var> with <var>compacted output</var><del cite="#change_7">
transforming <var>compacted output</var> from the
<a>internal representation</a> to a JSON serialization</del>.</li>
<li id="idl-compact-step-10">Resolve the <var>promise</var> with <var>compacted output</var>.</li>
</ol>

<dl class="parameters">
Expand Down Expand Up @@ -5986,9 +5952,7 @@ <h3>Algorithm</h3>
set <var>expanded output</var> to an <a>array</a> containing only <var>expanded output</var>.</li>
</ol>
</li>
<li id="idl-expand-step-9">Resolve the <var>promise</var> with <var>expanded output</var><del cite="#change_7">
transforming <var>expanded output</var> from the
<a>internal representation</a> to a JSON serialization</del>.</li>
<li id="idl-expand-step-9">Resolve the <var>promise</var> with <var>expanded output</var>.</li>
</ol>

<dl class="parameters">
Expand Down Expand Up @@ -6050,9 +6014,7 @@ <h3>Algorithm</h3>
otherwise to <code>null</code>.</li>
</ol>
</li>
<li id="idl-flatten-step-7">Resolve the <var>promise</var> with <var>flattened output</var><del cite="#change_7">
transforming <var>flattened output</var> from the
<a>internal representation</a> to a JSON serialization</del>.</li>
<li id="idl-flatten-step-7">Resolve the <var>promise</var> with <var>flattened output</var>.</li>
</ol>

<dl class="parameters">
Expand Down Expand Up @@ -6090,9 +6052,7 @@ <h3>Algorithm</h3>
<a href="#serialize-rdf-as-json-ld-algorithm">Serialize RDF as JSON-LD Algorithm</a> method
using <a data-lt="jsonldprocessor-fromRdf-input">dataset</a>
and <a data-lt="jsonldprocessor-fromRdf-options">options</a>.</li>
<li id="idl-fromRdf-step-3">Resolve the <var>promise</var> with <var>expanded result</var><del cite="#change_7">
transforming <var>expanded output</var> from the
<a>internal representation</a> to a JSON serialization</del>.</li>
<li id="idl-fromRdf-step-3">Resolve the <var>promise</var> with <var>expanded result</var>.</li>
</ol>

<dl class="parameters">
Expand Down Expand Up @@ -6127,8 +6087,8 @@ <h3>Algorithm</h3>
<a data-link-for="JsonLdProcessor">expand()</a> method
using <a data-lt="jsonldprocessor-toRdf-input">input</a>
and <a data-lt="jsonldprocessor-toRdf-options">options</a>
<span class="changed">with {{JsonLdOptions/ordered}} set to <code>false</code><ins cite="#change_4">,
and {{JsonLdOptions/extractAllScripts}} defaulting to <code>true</code></ins></span>.</li>
<span class="changed">with {{JsonLdOptions/ordered}} set to <code>false</code>,
and {{JsonLdOptions/extractAllScripts}} defaulting to <code>true</code></span>.</li>
<li>Create a new <a>RdfDataset</a> <var>dataset</var>.</li>
<li>Create a new <a>map</a> <var>node map</var>.</li>
<li>Invoke the <a href="#node-map-generation">Node Map Generation algorithm</a>,
Expand Down Expand Up @@ -6283,37 +6243,34 @@ <h4>Internal Representation in Implementations</h4>

<section id="serialization-and-deserialization">
<h4>Serialization and Deserialization</h4>
<ins cite="#change_7">
<p>This section defines the requirements for serializing and deserializing
JSON from and to the <a>internal representation</a>, as appropriate,
based on the provided or requested <a>Content-Type</a>.
A <a>Content-Type</a> of <code>application/json</code>,
or media type with a <code>+json</code> suffix as defined in [[RFC6839]]
MUST serialize or deserialize to a format consistent with the JSON Grammar
as specified in [[RFC8259]].</p>

<p>This section defines the requirements for serializing and deserializing
JSON from and to the <a>internal representation</a>, as appropriate,
based on the provided or requested <a>Content-Type</a>.
A <a>Content-Type</a> of <code>application/json</code>,
or media type with a <code>+json</code> suffix as defined in [[RFC6839]]
MUST serialize or deserialize to a format consistent with the JSON Grammar
as specified in [[RFC8259]].</p>
<p class="note">This specification does not define serializations of the <a>internal representation</a>
for other media types, which may be defined by other specifications.</p>

<p class="note">This specification does not define serializations of the <a>internal representation</a>
for other media types, which may be defined by other specifications.</p>
<p class="note">See <a href="#html-content-algorithms" class="sectionRef"></a>
for details on extracting JSON from HTML.</p>

<p class="note">See <a href="#html-content-algorithms" class="sectionRef"></a>
for details on extracting JSON from HTML.</p>

<dl>
<dt>To transform a JSON-conforming string [[RFC8259]],</dt>
<dd>
deserialize into the
<a>internal representation</a> as described in {{LoadDocumentCallback}};
</dd>
<dl>
<dt>To transform a JSON-conforming string [[RFC8259]],</dt>
<dd>
deserialize into the
<a>internal representation</a> as described in {{LoadDocumentCallback}};
</dd>

<dt>To transform the <a>internal representation</a> to a JSON-LD document
</dt>
<dd>
serialize to JSON [[RFC8259]] using an appropriate serializer (e.g.,
[[ECMASCRIPT]] <code>[=ToString=]</code>);
</dd>
</dl>
</ins>
<dt>To transform the <a>internal representation</a> to a JSON-LD document
</dt>
<dd>
serialize to JSON [[RFC8259]] using an appropriate serializer (e.g.,
[[ECMASCRIPT]] <code>[=ToString=]</code>);
</dd>
</dl>
</section>
</section>

Expand Down Expand Up @@ -6623,12 +6580,11 @@ <h3>LoadDocumentCallback</h3>
<p class="note">The HTTP Link Header is ignored for documents served as <code>application/ld+json</code>,
<code>text/html</code>, or <code>application/xhtml+xml</code>.</p>
</li>
<li>Otherwise, <ins cite="#change_6">if</ins> the retrieved document's <a>Content-Type</a> is neither
<li>Otherwise, if the retrieved document's <a>Content-Type</a> is neither
<code>application/json</code>,
<code>application/ld+json</code>,
nor any other media type using a
<code>+json</code> suffix as defined in [[RFC6839]]<del cite="#change_6">.
Reject</del><ins cite="#change_6">, then reject</ins>
<code>+json</code> suffix as defined in [[RFC6839]], then reject
the <var>promise</var> passing a <a data-link-for="JsonLdErrorCode">loading document failed</a> error.
<div class="candidate correction" id="change_6">
<span class="marker">Candidate Correction 6</span>
Expand Down
Loading