Skip to content

Commit 9b1e522

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

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

index.html

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

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

@@ -11512,9 +11519,10 @@ <h1>JSON-LD Grammar</h1>
1151211519
<h2>Terms</h2>
1151311520

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

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

1151911527
<p class="changed">When used as the <a>prefix</a> in a <a>Compact IRI</a>, to avoid
1152011528
the potential ambiguity of a <a>prefix</a> being confused with an IRI
@@ -12020,7 +12028,8 @@ <h2>Context Definitions</h2>
1202012028
its value MUST be <code>true</code> or <code>false</code>.</p>
1202112029

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

1202512034
<p class="changed">If the <a>context definition</a> has an <code>@version</code> key,
1202612035
its value MUST be a <a>number</a> with the value <code>1.1</code>.</p>
@@ -12050,9 +12059,14 @@ <h2>Context Definitions</h2>
1205012059
<code>@container</code>,
1205112060
<code class="changed">@context</code>,
1205212061
<code class="changed">@prefix</code>,
12062+
<code class="changed">@propagate</code>, or
1205312063
<code class="changed">@protected</code>.
1205412064
An <a>expanded term definition</a> SHOULD NOT contain any other keys.</p>
1205512065

12066+
<p class="changed">When the associated term is `@type`, the <a>expanded term definition</a>
12067+
MUST NOT contain keys other than `@container` and `@protected`.
12068+
The value of `@container` is limited to the single value `@set`.</p>
12069+
1205612070
<p>If the term being defined is not a <a>compact IRI</a> or
1205712071
<a>absolute IRI</a> and the <a>active context</a> does not have an
1205812072
<code>@vocab</code> mapping, the <a>expanded term definition</a> MUST
@@ -12110,13 +12124,21 @@ <h2>Context Definitions</h2>
1211012124
<p class="changed">If an <a>expanded term definition</a> has an <code>@context</code> <a>entry</a>,
1211112125
it MUST be a valid <code>context definition</code>.</p>
1211212126

12127+
<p class="changed">If a <a>context</a> contains the <code>@import</code>
12128+
<a>keyword</a>, its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.
12129+
When used as a reference from an `@import`, the referenced <a>context definition</a> MUST NOT
12130+
include an `@import` key, itself.</p>
12131+
1211312132
<p class="changed">If the <a>expanded term definition</a> contains the <code>@nest</code>
1211412133
<a>keyword</a>, its value MUST be either <code>@nest</code>, or a term
1211512134
which expands to <code>@nest</code>.</p>
1211612135

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

12139+
<p class="changed">If the <a>expanded term definition</a> contains the <code>@propagate</code>
12140+
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
12141+
1212012142
<p class="changed">If the <a>expanded term definition</a> contains the <code>@protected</code>
1212112143
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
1212212144

0 commit comments

Comments
 (0)