Skip to content

Commit 2c51113

Browse files
committed
Improve description of keyword aliases using @protected and add more to the grammar.
For #246.
1 parent fb571ab commit 2c51113

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

index.html

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,13 +3052,20 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
30523052
<p><span class="changed">Other than for <code>@type</code>,</span> properties of
30533053
<a>expanded term definitions</a> where the term is a <a>keyword</a>
30543054
result in an error.
3055-
<span class="changed">When processing mode is set to <code>json-ld-1.1</code>,
3056-
a keyword may be used with an <a>expanded term definition</a> having
3057-
only the <a>entry</a> `@protected`;
3058-
see <a href="#protected-term-definitions" class="sectionRef"></a> for further details.
3059-
There is also an exception for <code>@type</code>;
3055+
<span class="changed">When processing mode is set to <code>json-ld-1.1</code>,t
3056+
there is also an exception for <code>@type</code>;
30603057
see <a href="#using-set-with-type" class="sectionRef"></a> for further details.</span></p>
30613058

3059+
<p class="changed">When processing mode is set to <code>json-ld-1.1</code>,
3060+
aliases of <a>keywords</a> are either <a>simple term definitions</a>,
3061+
where the value is a <a>keyword</a>,
3062+
or a <a>expanded term definitions</a> with an `@id` <a>entry</a> and optionally an `@protected` <a>entry</a>;
3063+
no other entries are allowed.
3064+
there is also an exception for aliases of <code>@type</code>,
3065+
as indicated above.
3066+
See <a href="#protected-term-definitions" class="sectionRef"></a> for further details
3067+
of using `@protected`.</p>
3068+
30623069
<p>Since keywords cannot be redefined, they can also not be aliased to
30633070
other keywords.</p>
30643071

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

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

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

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

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

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

12214+
<p class="changed">When the associated term is `@type`, the <a>expanded term definition</a>
12215+
MUST NOT contain keys other than `@container` and `@protected`.
12216+
The value of `@container` is limited to the single value `@set`.</p>
12217+
1220412218
<p>If the term being defined is not a <a>compact IRI</a> or
1220512219
<a>absolute IRI</a> and the <a>active context</a> does not have an
1220612220
<code>@vocab</code> mapping, the <a>expanded term definition</a> MUST
@@ -12268,6 +12282,9 @@ <h2>Context Definitions</h2>
1226812282
<p class="changed">If the <a>expanded term definition</a> contains the <code>@propagate</code>
1226912283
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
1227012284

12285+
<p class="changed">If the <a>expanded term definition</a> contains the <code>@protected</code>
12286+
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
12287+
1227112288
<p class="changed">If a <a>context</a> contains the <code>@import</code>
1227212289
<a>keyword</a>, its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.
1227312290
When used as a reference from an `@import`, the referenced <a>context definition</a> MUST NOT

0 commit comments

Comments
 (0)