Skip to content

Commit

Permalink
Improve description of keyword aliases using @protected and add mor…
Browse files Browse the repository at this point in the history
…e to the grammar.

For #246.
  • Loading branch information
gkellogg committed Sep 27, 2019
1 parent fb571ab commit 2c51113
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -3052,13 +3052,20 @@ <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>,
a keyword may be used with an <a>expanded term definition</a> having
only the <a>entry</a> `@protected`;
see <a href="#protected-term-definitions" class="sectionRef"></a> for further details.
There is also an exception for <code>@type</code>;
<span class="changed">When processing mode is set to <code>json-ld-1.1</code>,t
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>,
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>;
no other entries are allowed.
there is also an exception for aliases of <code>@type</code>,
as indicated above.
See <a href="#protected-term-definitions" class="sectionRef"></a> for further details
of using `@protected`.</p>

<p>Since keywords cannot be redefined, they can also not be aliased to
other keywords.</p>

@@ -11678,9 +11685,10 @@ <h1>JSON-LD Grammar</h1>
<h2>Terms</h2>

<p>A <a>term</a> is a short-hand <a>string</a> that expands
to an <a>IRI</a> or a <a>blank node identifier</a>.</p>
to an <a>IRI</a>, <a>blank node identifier</a>, or <a>keyword</a>.</p>

<p>A <a>term</a> MUST NOT equal any of the JSON-LD <a>keywords</a>.</p>
<p>A <a>term</a> MUST NOT equal any of the JSON-LD <a>keywords</a>,
<span class="changed">other than `@type` in</span>.</p>

<p class="changed">When used as the <a>prefix</a> in a <a>Compact IRI</a>, to avoid
the potential ambiguity of a <a>prefix</a> being confused with an IRI
@@ -12167,7 +12175,8 @@ <h2>Context Definitions</h2>
or <a>null</a>.</p>

<p class="changed">If the <a>context definition</a> has an <code>@type</code> key,
its value MUST be a <a>map</a> with the single <a>entry</a> <code>@container</code> set to <code>@set</code>.</p>
its value MUST be a <a>map</a> with the single <a>entry</a> <code>@container</code> set to <code>@set</code>,
and optional entry `@protected`.</p>

<p>If the <a>context definition</a> has an <code>@vocab</code> key,
its value MUST be a <a>absolute IRI</a>, a <a>compact IRI</a>,
@@ -12197,10 +12206,15 @@ <h2>Context Definitions</h2>
<code>@language</code>,
<code>@container</code>,
<code class="changed">@context</code>,
<code class="changed">@prefix</code>, or
<code class="changed">@prefix</code>,
<code class="changed">@protected</code>, or
<code class="changed">@propagate</code>.
An <a>expanded term definition</a> SHOULD NOT contain any other keys.</p>

<p class="changed">When the associated term is `@type`, the <a>expanded term definition</a>
MUST NOT contain keys other than `@container` and `@protected`.
The value of `@container` is limited to the single value `@set`.</p>

<p>If the term being defined is not a <a>compact IRI</a> or
<a>absolute IRI</a> and the <a>active context</a> does not have an
<code>@vocab</code> mapping, the <a>expanded term definition</a> MUST
@@ -12268,6 +12282,9 @@ <h2>Context Definitions</h2>
<p class="changed">If the <a>expanded term definition</a> contains the <code>@propagate</code>
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>

<p class="changed">If the <a>expanded term definition</a> contains the <code>@protected</code>
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>

<p class="changed">If a <a>context</a> contains the <code>@import</code>
<a>keyword</a>, its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.
When used as a reference from an `@import`, the referenced <a>context definition</a> MUST NOT

0 comments on commit 2c51113

Please sign in to comment.