Skip to content

Commit a7605a2

Browse files
committed
Changes for defaulting processing mode to json-ld-1.1.
1 parent 51f5007 commit a7605a2

File tree

2 files changed

+42
-41
lines changed

2 files changed

+42
-41
lines changed

common/terms.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,16 @@
320320
when prepended to the suffix of the <a>compact IRI</a>,
321321
results in an <a>absolute IRI</a>.</dd>
322322
<dt><dfn data-cite="JSON-LD11#dfn-processing-mode">processing mode</dfn></dt><dd>
323-
The processing mode defines how a <a>JSON-LD document</a> is processed.
324-
By default, all documents are assumed to be conformant with <a data-cite="JSON-LD10" data-no-xref="">JSON-LD 1.0</a> [[JSON-LD10]].
323+
The <a>processing mode</a> defines how a <a>JSON-LD document</a> is processed.
324+
By default, all documents are assumed to be conformant with this specification.
325325
By defining a different version using the <code>@version</code> <a>entry</a> in a <a>context</a>,
326-
or via explicit API option,
327-
other processing modes can be accessed.
326+
publishers can ensure that processors conformant with <a data-cite="JSON-LD10" data-no-xref="">JSON-LD 1.0</a> [[JSON-LD10]]
327+
will not accidently process JSON-LD 1.1 documents, possibly creating a different output.
328+
The API provides an option for setting the <a>processing mode</a> to `json-ld-1.0`,
329+
which will prevent JSON-LD 1.1 features from being activated,
330+
or error if <code>@version</code> <a>entry</a> in a <a>context</a> is explicitly set to `1.1`.
328331
This specification extends <a data-cite="JSON-LD10" data-no-xref="">JSON-LD 1.0</a>
329-
via the <code>json-ld-1.1</code> <a>processing mode</a>.</dd>
332+
via the `json-ld-1.1` <a>processing mode</a>.</dd>
330333
<dt><dfn data-cite="JSON-LD11#dfn-set-object">set object</dfn></dt><dd>
331334
A <a>set object</a> is a <a>map</a> that has an <code>@set</code> <a>entry</a>.
332335
It may also have an <code>@index</code> key, but no other <a>entries</a>.</dd>

index.html

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ <h2>Syntax Tokens and Keywords</h2>
601601
<dt class="changed"><code>@version</code></dt><dd class="changed">
602602
Used in a <a>context definition</a> to set the <a>processing mode</a>.
603603
New features since [[[JSON-LD10]]] [[JSON-LD10]] described in this specification are
604-
only available when <a>processing mode</a> has been explicitly set to
605-
<code>json-ld-1.1</code>.
604+
not available when <a>processing mode</a> has been explicitly set to
605+
`json-ld-1.0`.
606606
<div class="note">Within a <a>context definition</a> `@version` takes the specific value `1.1`, not
607607
`"json-ld-1.1"`, as a JSON-LD 1.0 processor may accept a string value for `@version`,
608608
but will reject a numeric value.</div>
@@ -2247,9 +2247,12 @@ <h1>Advanced Concepts</h1>
22472247
<section class="changed informative"><h2>JSON-LD 1.1 Processing Mode</h2>
22482248

22492249
<p>New features defined in JSON-LD 1.1 are available
2250-
when the <a>processing mode</a> is set to <code>json-ld-1.1</code>.
2251-
This may be set using the <code>@version</code> <a>entry</a> in a <code>context</code>
2252-
set to the value <code>1.1</code> as a <a>number</a>, or through an API option.</p>
2250+
unless the <a>processing mode</a> is set to `json-ld-1.0`.
2251+
This may be set through an API option.
2252+
The <a>processing mode</a> may be explicitly set to `json-ld-1.1` using the `@version` <a>entry</a> in a <a>context</a>
2253+
set to the value `1.1` as a <a>number</a>, or through an API option.
2254+
Explicitly setting the <a>processing mode</a> to `json-ld-1.1`
2255+
will prohibit JSON-LD 1.0 processors from incorrectly processing a JSON-LD 1.1 document.</p>
22532256

22542257
<pre class="example nohighlight" data-transform="updateExample"
22552258
title="Setting @version in context">
@@ -2272,9 +2275,9 @@ <h1>Advanced Concepts</h1>
22722275
the former will be interpreted as having had <code>"@version": 1.1</code> defined within it.</p>
22732276

22742277
<p class="note">Setting the <a>processing mode</a> explicitly
2275-
for JSON-LD 1.1 is necessary so that a [[[JSON-LD10]]] processor
2276-
does not attempt to process a JSON-LD 1.1 document and silently
2277-
produce different results.</p>
2278+
to `json-ld-1.1` is RECOMMENDED to prevent a [[[JSON-LD10]]] processor
2279+
from incorrectly processing a JSON-LD 1.1 document and
2280+
producin different results.</p>
22782281
</section>
22792282

22802283
<section class="informative"><h2>Default Vocabulary</h2>
@@ -2405,7 +2408,7 @@ <h1>Advanced Concepts</h1>
24052408

24062409
</aside>
24072410

2408-
<p class="changed">Since <code>json-ld-1.1</code>,
2411+
<p class="changed">Since JSON-LD 1.1,
24092412
the <a>vocabulary mapping</a> in a <a>local context</a> can be set to the a <a>relative IRI</a>,
24102413
which is concatenated to any <a>vocabulary mapping</a> in the <a>active context</a>
24112414
(see <a href="#document-relative-vocabulary-mapping" class="sectionRef"></a>
@@ -2572,7 +2575,7 @@ <h1>Advanced Concepts</h1>
25722575
<h3>Using the Document Base for the Default Vocabulary</h3>
25732576
<p>In some cases, vocabulary terms are defined directly within the document
25742577
itself, rather than in an external vocabulary.
2575-
Since <code>json-ld-1.1</code>, the <a>vocabulary mapping</a> in a <a>local context</a>
2578+
Since JSON-LD 1.1, the <a>vocabulary mapping</a> in a <a>local context</a>
25762579
can be set to a <a>relative IRI</a>,
25772580
which is, if there is no vocabulary mapping in scope, resolved against the <a>base IRI</a>.
25782581
This causes terms which are expanded relative to the vocabulary,
@@ -2804,7 +2807,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
28042807
</pre>
28052808
</aside>
28062809

2807-
<p class="changed">When operating with the default <a>processing mode</a>
2810+
<p class="changed">When operating explicitly with the <a>processing mode</a>
28082811
for [[[JSON-LD10]]] compatibility, terms may be chosen as <a>compact IRI</a> prefixes when
28092812
compacting only if a <a>simple term definition</a> is used where the value ends with a
28102813
URI <a data-cite="RFC3986#section-2.2">gen-delim</a> character (e.g, <code>/</code>,
@@ -2834,7 +2837,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
28342837
-->
28352838
</pre>
28362839

2837-
<p class="changed">Using the following context in the default 1.0 <a>processing mode</a>
2840+
<p class="changed">Using the following context in the 1.0 <a>processing mode</a>
28382841
will now select the term <em>vocab</em> rather than
28392842
<em>property</em>, even though the IRI associated with
28402843
<em>property</em> captures more of the original IRI.</p>
@@ -2910,8 +2913,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
29102913
<p class="changed">In the original [[JSON-LD10]],
29112914
the term selection algorithm would have selected <em>property</em>,
29122915
creating the Compact IRI <em>property:One</em>.
2913-
If the <a>processing mode</a> is <code>json-ld-1.1</code>, the original behavior can be
2914-
made explicit using <code>@prefix</code>:</p>
2916+
The original behavior can be made explicit using <code>@prefix</code>:</p>
29152917

29162918
<pre id="term-selection-context-1"
29172919
class="example context"
@@ -3065,11 +3067,11 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
30653067
<p><span class="changed">Other than for <code>@type</code>,</span> properties of
30663068
<a>expanded term definitions</a> where the term is a <a>keyword</a>
30673069
result in an error.
3068-
<span class="changed">When processing mode is set to <code>json-ld-1.1</code>,
3070+
<span class="changed">Unless the <a>processing mode</a> is set to `json-ld-1.0`,
30693071
there is also an exception for <code>@type</code>;
30703072
see <a href="#using-set-with-type" class="sectionRef"></a> for further details.</span></p>
30713073

3072-
<p class="changed">When processing mode is set to <code>json-ld-1.1</code>,
3074+
<p class="changed">Unless the <a>processing mode</a> is set to `json-ld-1.0`,
30733075
aliases of <a>keywords</a> are either <a>simple term definitions</a>,
30743076
where the value is a <a>keyword</a>,
30753077
or a <a>expanded term definitions</a> with an `@id` <a>entry</a> and optionally an `@protected` <a>entry</a>;
@@ -3561,8 +3563,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
35613563
earlier less deeply nested definitions, as discussed in
35623564
<a href="#advanced-context-usage" class="sectionRef"></a>.</p>
35633565

3564-
<p class="note"><a>Scoped Contexts</a> are a new feature in JSON-LD 1.1, requiring
3565-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
3566+
<p class="note"><a>Scoped Contexts</a> are a new feature in JSON-LD 1.1.</p>
35663567
</section>
35673568

35683569
<section class="informative changed"><h2>Context Propagation</h2>
@@ -4193,8 +4194,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
41934194
As a consequence, context publishers should use this feature with care.
41944195
</p>
41954196

4196-
<p class="note">Protected term definitions are a new feature in JSON-LD 1.1, requiring
4197-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
4197+
<p class="note">Protected term definitions are a new feature in JSON-LD 1.1.</p>
41984198
</section>
41994199
</section>
42004200

@@ -6184,7 +6184,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
61846184
</section>
61856185

61866186
<section class="informative changed"><h2>Using <code>@set</code> with <code>@type</code></h2>
6187-
<p class="changed">When <a>processing mode</a> is set to <code>json-ld-1.1</code>,
6187+
<p class="changed">Unless the <a>processing mode</a> is set to `json-ld-1.0`,
61886188
<code>@type</code> may be used with an <a>expanded term definition</a> with <code>@container</code> set
61896189
to <code>@set</code>; no other <a>entries</a> may be set within such an <a>expanded term definition</a>.
61906190
This is used by the <a data-cite="JSON-LD11-API#compaction-algorithm">Compaction algorithm</a> to ensure that the values of <code>@type</code> (or an alias)
@@ -6517,8 +6517,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
65176517
</pre>
65186518
</aside>
65196519

6520-
<p class="note"><a>Nested properties</a> are a new feature in JSON-LD 1.1, requiring
6521-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
6520+
<p class="note"><a>Nested properties</a> are a new feature in JSON-LD 1.1.</p>
65226521
</section>
65236522

65246523
<section class="informative"><h2>Embedding</h2>
@@ -7152,7 +7151,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
71527151
When <em>compacting</em>, this ensures that a <a>JSON-LD Processor</a> will use
71537152
the <a>array</a> form for all values of indexes.</p>
71547153

7155-
<p class="changed">If the <a>processing mode</a> is set to <code>json-ld-1.1</code>,
7154+
<p class="changed">Unless the <a>processing mode</a> is set to `json-ld-1.0`,
71567155
the special index <code>@none</code> is used for indexing
71577156
data which does not have an associated index, which is useful to maintain
71587157
a normalized representation.</p>
@@ -7290,7 +7289,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
72907289
the keys used to index objects are semantically linked to these objects,
72917290
and should be preserved not only syntactically, but also semantically.
72927291
</p>
7293-
<p>If the <a>processing mode</a> is set to <code>json-ld-1.1</code>,
7292+
<p>Unless the <a>processing mode</a> is set to `json-ld-1.0`,
72947293
<code>"@container": "@index"</code> in a term description can be accompanied with
72957294
an <code>"@index"</code> key. The value of that key must map to an <a>IRI</a>,
72967295
which identifies the semantic property linking each object to its key.
@@ -7574,7 +7573,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
75747573
</pre>
75757574
</aside>
75767575

7577-
<p class="changed">If the <a>processing mode</a> is set to <code>json-ld-1.1</code>,
7576+
<p class="changed">Unless the <a>processing mode</a> is set to `json-ld-1.0`,
75787577
the special index <code>@none</code> is used for indexing
75797578
strings which do not have a language; this is useful to maintain
75807579
a normalized representation for string values not having a datatype.</p>
@@ -8010,8 +8009,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
80108009
</pre>
80118010
</aside>
80128011

8013-
<p class="note"><a>Id maps</a> are a new feature in JSON-LD 1.1, requiring
8014-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
8012+
<p class="note"><a>Id maps</a> are a new feature in JSON-LD 1.1.</p>
80158013
</section>
80168014
<section class="informative changed"><h2>Node Type Indexing</h2>
80178015

@@ -8339,8 +8337,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
83398337
<p>As with <a>id maps</a>, when used with <code>@type</code>, a container may also
83408338
include <code>@set</code> to ensure that key values are always contained in an array.</p>
83418339

8342-
<p class="note"><a>Type maps</a> are a new feature in JSON-LD 1.1, requiring
8343-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
8340+
<p class="note"><a>Type maps</a> are a new feature in JSON-LD 1.1.</p>
83448341
</section>
83458342
</section>
83468343

@@ -9317,8 +9314,7 @@ <h3>Graph Containers</h3>
93179314
associated with the <a>named graph</a>, which exists separately within
93189315
the <a>dataset</a>.</p>
93199316

9320-
<p class="note">Graph Containers are a new feature in JSON-LD 1.1, requiring
9321-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
9317+
<p class="note">Graph Containers are a new feature in JSON-LD 1.1.</p>
93229318
</section>
93239319

93249320
<section class="informative changed"><h3>Named Graph Data Indexing</h3>
@@ -9575,8 +9571,7 @@ <h3>Graph Containers</h3>
95759571
-->
95769572
</pre>
95779573
</aside>
9578-
<p class="note">Named Graph Data Indexing is a new feature in JSON-LD 1.1, requiring
9579-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
9574+
<p class="note">Named Graph Data Indexing is a new feature in JSON-LD 1.1.</p>
95809575
</section>
95819576

95829577
<section class="informative changed"><h3>Named Graph Indexing</h3>
@@ -9859,8 +9854,7 @@ <h3>Graph Containers</h3>
98599854
</pre>
98609855
</aside>
98619856

9862-
<p class="note">Graph Containers are a new feature in JSON-LD 1.1, requiring
9863-
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
9857+
<p class="note">Graph Containers are a new feature in JSON-LD 1.1.</p>
98649858
</section>
98659859
</section>
98669860

@@ -13617,6 +13611,10 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
1361713611
retrieving a JSON-LD document when the returned document is not JSON.</li>
1361813612
<li><a>Value objects</a>, and associated <a>context</a> and <a>term definitions</a> have been updated to
1361913613
support `@direction` for setting the <a>base direction</a> of strings.</li>
13614+
<li>The <a>processing mode</a> is now implicitly `json-ld-1.1`, unless set
13615+
explicitly to `json-ld-1.0`. Processing mode is wired to `json-ld-1.1`
13616+
when the first JSON-LD 1.1 specific feature is encountered, and it is
13617+
not set explicilty.</li>
1362013618
</ul>
1362113619
</section>
1362213620

0 commit comments

Comments
 (0)