Skip to content

Lazy eval version #284

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 4 commits into from
Oct 18, 2019
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
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ruby-rdf/json-ld.git
revision: b1a47abbdd6db71d2b9ccb42811445fee1626d60
revision: 94a5f041320f71ef89e4e82c73a01fd07ab4af27
branch: develop
specs:
json-ld (3.0.2)
Expand Down Expand Up @@ -74,7 +74,7 @@ GEM
sparql (~> 3.0)
sparql-client (~> 3.0)
mini_portile2 (2.4.0)
multi_json (1.14.0)
multi_json (1.14.1)
net-http-persistent (3.1.0)
connection_pool (~> 2.2)
nokogiri (1.10.4)
Expand Down
13 changes: 8 additions & 5 deletions common/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,16 @@
when prepended to the suffix of the <a>compact IRI</a>,
results in an <a>absolute IRI</a>.</dd>
<dt><dfn data-cite="JSON-LD11#dfn-processing-mode">processing mode</dfn></dt><dd>
The processing mode defines how a <a>JSON-LD document</a> is processed.
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]].
The <a>processing mode</a> defines how a <a>JSON-LD document</a> is processed.
By default, all documents are assumed to be conformant with this specification.
By defining a different version using the <code>@version</code> <a>entry</a> in a <a>context</a>,
or via explicit API option,
other processing modes can be accessed.
publishers can ensure that processors conformant with <a data-cite="JSON-LD10" data-no-xref="">JSON-LD 1.0</a> [[JSON-LD10]]
will not accidently process JSON-LD 1.1 documents, possibly creating a different output.
The API provides an option for setting the <a>processing mode</a> to `json-ld-1.0`,
which will prevent JSON-LD 1.1 features from being activated,
or error if <code>@version</code> <a>entry</a> in a <a>context</a> is explicitly set to `1.1`.
This specification extends <a data-cite="JSON-LD10" data-no-xref="">JSON-LD 1.0</a>
via the <code>json-ld-1.1</code> <a>processing mode</a>.</dd>
via the `json-ld-1.1` <a>processing mode</a>.</dd>
<dt><dfn data-cite="JSON-LD11#dfn-set-object">set object</dfn></dt><dd>
A <a>set object</a> is a <a>map</a> that has an <code>@set</code> <a>entry</a>.
It may also have an <code>@index</code> key, but no other <a>entries</a>.</dd>
Expand Down
68 changes: 32 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ <h2>Syntax Tokens and Keywords</h2>
<dt class="changed"><code>@version</code></dt><dd class="changed">
Used in a <a>context definition</a> to set the <a>processing mode</a>.
New features since [[[JSON-LD10]]] [[JSON-LD10]] described in this specification are
only available when <a>processing mode</a> has been explicitly set to
<code>json-ld-1.1</code>.
not available when <a>processing mode</a> has been explicitly set to
`json-ld-1.0`.
<div class="note">Within a <a>context definition</a> `@version` takes the specific value `1.1`, not
`"json-ld-1.1"`, as a JSON-LD 1.0 processor may accept a string value for `@version`,
but will reject a numeric value.</div>
Expand Down Expand Up @@ -2247,9 +2247,12 @@ <h1>Advanced Concepts</h1>
<section class="changed informative"><h2>JSON-LD 1.1 Processing Mode</h2>

<p>New features defined in JSON-LD 1.1 are available
when the <a>processing mode</a> is set to <code>json-ld-1.1</code>.
This may be set using the <code>@version</code> <a>entry</a> in a <code>context</code>
set to the value <code>1.1</code> as a <a>number</a>, or through an API option.</p>
unless the <a>processing mode</a> is set to `json-ld-1.0`.
This may be set through an API option.
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>
set to the value `1.1` as a <a>number</a>, or through an API option.
Explicitly setting the <a>processing mode</a> to `json-ld-1.1`
will prohibit JSON-LD 1.0 processors from incorrectly processing a JSON-LD 1.1 document.</p>

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

<p class="note">Setting the <a>processing mode</a> explicitly
for JSON-LD 1.1 is necessary so that a [[[JSON-LD10]]] processor
does not attempt to process a JSON-LD 1.1 document and silently
produce different results.</p>
to `json-ld-1.1` is RECOMMENDED to prevent a [[[JSON-LD10]]] processor
from incorrectly processing a JSON-LD 1.1 document and
producing different results.</p>
</section>

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

</aside>

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

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

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

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

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

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

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

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

Expand Down Expand Up @@ -6184,7 +6184,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
</section>

<section class="informative changed"><h2>Using <code>@set</code> with <code>@type</code></h2>
<p class="changed">When <a>processing mode</a> is set to <code>json-ld-1.1</code>,
<p class="changed">Unless the <a>processing mode</a> is set to `json-ld-1.0`,
<code>@type</code> may be used with an <a>expanded term definition</a> with <code>@container</code> set
to <code>@set</code>; no other <a>entries</a> may be set within such an <a>expanded term definition</a>.
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)
Expand Down Expand Up @@ -6517,8 +6517,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
</pre>
</aside>

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

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

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

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

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

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

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

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

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

<section class="informative changed"><h3>Named Graph Data Indexing</h3>
Expand Down Expand Up @@ -9575,8 +9571,7 @@ <h3>Graph Containers</h3>
-->
</pre>
</aside>
<p class="note">Named Graph Data Indexing is a new feature in JSON-LD 1.1, requiring
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
<p class="note">Named Graph Data Indexing is a new feature in JSON-LD 1.1.</p>
</section>

<section class="informative changed"><h3>Named Graph Indexing</h3>
Expand Down Expand Up @@ -9859,8 +9854,7 @@ <h3>Graph Containers</h3>
</pre>
</aside>

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

Expand Down Expand Up @@ -13617,6 +13611,8 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
retrieving a JSON-LD document when the returned document is not JSON.</li>
<li><a>Value objects</a>, and associated <a>context</a> and <a>term definitions</a> have been updated to
support `@direction` for setting the <a>base direction</a> of strings.</li>
<li>The <a>processing mode</a> is now implicitly `json-ld-1.1`, unless set
explicitly to `json-ld-1.0`.</li>
</ul>
</section>

Expand Down