Skip to content

Commit c4c6dd0

Browse files
committed
Address @pchampin's concerns and fix some other spelling issues.
1 parent ec69e2f commit c4c6dd0

File tree

1 file changed

+32
-28
lines changed

1 file changed

+32
-28
lines changed

index.html

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4672,15 +4672,15 @@ <h2>Algorithm</h2>
46724672
</li>
46734673
<li>Initialize an empty <a>array</a> <var>result</var>.</li>
46744674
<li>For each <var>subject</var> and <var>node</var> in <var>default graph</var>
4675-
ordered lexographically by <var>subject</var>
4675+
ordered lexicographically by <var>subject</var>
46764676
<span class="changed">if <a data-link-for="JsonLdOptions">ordered</a> is <code>true</code></span>:
46774677
<ol>
46784678
<li>If <var>graph map</var> has a <var>subject</var> <a>member</a>:
46794679
<ol>
46804680
<li>Add an <code>@graph</code> <a>member</a> to <var>node</var> and initialize
46814681
its value to an empty <a>array</a>.</li>
46824682
<li>For each key-value pair <var>s</var>-<var>n</var> in the <var>subject</var>
4683-
<a>member</a> of <var>graph map</var> ordered lexographically by <var>s</var>
4683+
<a>member</a> of <var>graph map</var> ordered lexicographically by <var>s</var>
46844684
<span class="changed">if <a data-link-for="JsonLdOptions">ordered</a> is <code>true</code></span>,
46854685
append <var>n</var> to the <code>@graph</code> <a>member</a> of <var>node</var> after
46864686
removing its <code>usages</code> <a>member</a>, unless the only
@@ -4875,7 +4875,7 @@ <h2>Data Round Tripping</h2>
48754875
<li>Native Numeric values SHOULD be serialized according to
48764876
<a data-cite="?ECMASCRIPT#sec-tostring-applied-to-the-number-type">Section 7.1.12.1</a> of [[?ECMASCRIPT]],</li>
48774877
<li>Strings SHOULD be serialized with Unicode codepoints from <code>U+0000</code> through <code>U+001F</code>
4878-
using lowercase hexaddecimal Unicode notation (<code>\uhhhh</code>) unless in the set
4878+
using lowercase hexadecimal Unicode notation (<code>\uhhhh</code>) unless in the set
48794879
of predefined JSON control characters <code>U+0008</code>, <code>U+0009</code>,
48804880
<code>U+000A</code>, <code>U+000C</code> or <code>U+000D</code>
48814881
which SHOULD be serialized as <code>\b</code>, <code>\t</code>, <code>\n</code>, <code>\f</code> and <code>\r</code> respectively.
@@ -5113,8 +5113,8 @@ <h3>The <dfn>JsonLdProcessor</dfn> Interface</h3>
51135113
for <a data-link-for="LoadDocumentCallback">url</a>,
51145114
the <a data-link-for="JsonldOptions">extractAllScripts</a> option for <a data-link-for="LoadDocumentOptions">extractAllScripts</a>.
51155115
</li>
5116-
<li class="changed">If necessary, transform <a data-link-for="RemoteDocument">document</a>
5117-
from <var>remote document</var> into the <a>internal representation</a>.
5116+
<li class="changed">If <a data-link-for="RemoteDocument">document</a>
5117+
from <var>remote document</var> is a <a>string</a>, transform into the <a>internal representation</a>.
51185118
If <a data-link-for="RemoteDocument">document</a> cannot be transformed to the <a>internal representation</a>,
51195119
reject <var>promise</var> passing a <a data-link-for="JsonLdErrorCode">loading document failed</a> error.</li>
51205120
<li>Initialize a new empty <var>active context</var>.
@@ -5380,7 +5380,7 @@ <h3>RDF Dataset Interfaces</h3>
53805380
</dd>
53815381
<dt><dfn data-dfn-for="RdfGraph">iterable</dfn></dt>
53825382
<dd>A <a data-cite="WEBIDL#dfn-value-iterator">value iterator</a>
5383-
over the <a>RdfTriple</a> instancesassociated with the graph.
5383+
over the <a>RdfTriple</a> instances associated with the graph.
53845384
Note that a given <a>RdfTriple</a> instance may appear in more than one graph
53855385
within a particular <a>RdfDataset</a> instance.</dd>
53865386
</dl>
@@ -5514,7 +5514,7 @@ <h3>The JsonLdOptions Type</h3>
55145514
to use JSON-LD native types as values, where possible.</dd>
55155515
<dt class="changed"><dfn data-dfn-for="JsonLdOptions">useNativeTypes</dfn></dt>
55165516
<dd class="changed">Causes the <a href="#serialize-rdf-as-json-ld-algorithm">Serialize RDF as JSON-LD Algorithm</a>
5517-
to use native JSON values in <a>value objects</a> avoiding the need for an explicity <code>@type</code>.</dd>
5517+
to use native JSON values in <a>value objects</a> avoiding the need for an explicitly <code>@type</code>.</dd>
55185518
<dt class="changed"><dfn data-dfn-for="JsonLdOptions">useRdfType</dfn></dt>
55195519
<dd class="changed">Enables special rules for the <a href="#serialize-rdf-as-json-ld-algorithm">Serialize RDF as JSON-LD Algorithm</a>
55205520
causing <code>rdf:type</code> properties to be kept as <a>IRIs</a> in the output, rather than use <code>@type</code>.</dd>
@@ -5585,8 +5585,7 @@ <h3>LoadDocumentCallback</h3>
55855585
<p>If multiple HTTP Link Headers using the <code>http://www.w3.org/ns/json-ld#context</code> link relation are found,
55865586
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <a data-link-for="JsonLdErrorCode">multiple context link headers</a>
55875587
and processing is terminated.</p>
5588-
<p>Processors MAY transform <var>document</var> to the <a>internal representation</a>
5589-
using the <a href="#extract-script-content">Extract Script Content algorithm</a>.</p>
5588+
<p>Processors MAY transform <var>document</var> to the <a>internal representation</a>.</p>
55905589
<p class="note">The HTTP Link Header is ignored for documents served as <code>application/ld+json</code>
55915590
or <code>text/html</code>.</p>
55925591
</li>
@@ -5623,44 +5622,49 @@ <h3>LoadDocumentCallback</h3>
56235622
having an <a data-cite="HTML/semantics.html#attr-link-type">type attribute</a>
56245623
of <code>application/ld+json</code> along with the value of the
56255624
<a data-link-for="LoadDocumentOptions">profile</a> option, if found.</li>
5626-
<li>If <var>source</var> is undefined and the <a data-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5625+
<li>If <var>source</var> is still undefined and the <a data-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
56275626
set <var>source</var> to the <a data-cite="DOM#dom-node-textcontent">textContent</a>
56285627
of the first <a>JSON-LD script element</a> in <var>document</var>.
56295628
<p>If no such element is found,
56305629
or the located element is not a <a>JSON-LD script element</a>,
56315630
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <a data-link-for="JsonLdErrorCode">loading document failed</a>
56325631
and processing is terminated.</p></li>
5633-
<li>If <var>source</var> is defined and the,
5632+
<li>If <var>source</var> is defined,
56345633
set <var>document</var> to the result of the
56355634
<a href="#extract-script-content">Extract Script Content algorithm</a>,
56365635
using <var>source</var>, rejecting <var>promise</var>
56375636
with a <a>JsonLdError</a> whose code set from the result, if an error is detected
56385637
and processing is terminated.
56395638
</li>
5640-
<li>Otherwise, if <var>source</var> is undefined and the <a data-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5641-
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <a data-link-for="JsonLdErrorCode">loading document failed</a>
5642-
and processing is terminated.</li>
5643-
<li>Otherwise, if <var>source</var> is undefined and the <a data-link-for="LoadDocumentOptions">extractAllScripts</a> option is <code>true</code>,
5644-
set <var>document</var> to a new empty <a>array</a>.
5645-
For each <a>JSON-LD script element</a> in <var>input</var>:
5639+
<li>Otherwise, <var>source</var> is undefined.
56465640
<ol>
5647-
<li>Set <var>source</var> to its <a data-cite="DOM#dom-node-textcontent">textContent</a>.</li>
5648-
<li>Set <var>script content</var> to the result of the <a href="#extract-script-content">Extract Script Content algorithm</a>,
5649-
using <var>source</var>, rejecting <var>promise</var>
5650-
with a <a>JsonLdError</a> whose code set from the result, if an error is detected
5651-
and processing is terminated.</li>
5652-
<li>If <var>script content</var> is an <a>array</a>, merge it to the end of <var>document</var>.</li>
5653-
<li>Otherwise, append <var>script content</var> to <var>document</var>.</li>
5641+
<li>If the <a data-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5642+
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <a data-link-for="JsonLdErrorCode">loading document failed</a>
5643+
and processing is terminated.</li>
5644+
<li>Otherwise, the <a data-link-for="LoadDocumentOptions">extractAllScripts</a> option is <code>true</code>.
5645+
Set <var>document</var> to a new empty <a>array</a>.
5646+
For each <a>JSON-LD script element</a> in <var>input</var>:
5647+
<ol>
5648+
<li>Set <var>source</var> to its <a data-cite="DOM#dom-node-textcontent">textContent</a>.</li>
5649+
<li>Set <var>script content</var> to the result of the <a href="#extract-script-content">Extract Script Content algorithm</a>,
5650+
using <var>source</var>, rejecting <var>promise</var>
5651+
with a <a>JsonLdError</a> whose code set from the result, if an error is detected
5652+
and processing is terminated.</li>
5653+
<li>If <var>script content</var> is an <a>array</a>, merge it to the end of <var>document</var>.</li>
5654+
<li>Otherwise, append <var>script content</var> to <var>document</var>.</li>
5655+
</ol>
5656+
</li>
56545657
</ol>
56555658
</li>
56565659
</ol>
56575660
</li>
5658-
<li>Otherwise, if the retrieved document's <a>Content-Type</a> is neither
5661+
<li>Otherwise, the retrieved document's <a>Content-Type</a> is neither
56595662
<code>application/json</code>,
56605663
<code>application/ld+json</code>,
5664+
<code>text/html</code>,
56615665
nor any other media type using a
5662-
<code>+json</code> suffix as defined in [[RFC6839]],
5663-
reject the <var>promise</var> passing a <a data-link-for="JsonLdErrorCode">loading document failed</a> error.</li>
5666+
<code>+json</code> suffix as defined in [[RFC6839]].
5667+
Reject the <var>promise</var> passing a <a data-link-for="JsonLdErrorCode">loading document failed</a> error.</li>
56645668
<li>Create a new <a>RemoteDocument</a> <var>remote document</var> using <var>document</var>,
56655669
the returned <a>Content-Type</a> (without parameters) as <a data-link-for="RemoteDocument">contentType</a>,
56665670
any returned <code>profile</code> parameter,
@@ -6084,7 +6088,7 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
60846088
of type <code>application/ld+json;profile=http://www.w3.org/ns/json-ld#context</code>,
60856089
or <code>application/ld+json</code> is used as the context for further processing.
60866090
This allows a mechanism for documenting the content of a context using HTML.</li>
6087-
<li>Consolodate <a>RemoteDocument</a> processing into the <a>LoadDocumentCallback</a>
6091+
<li>Consolidate <a>RemoteDocument</a> processing into the <a>LoadDocumentCallback</a>
60886092
including variations on HTML processing.</li>
60896093
</ul>
60906094
</section>

0 commit comments

Comments
 (0)