Skip to content

Improve description of keyword aliases using @protected #272

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 3 commits into from
Sep 28, 2019
Merged
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
44 changes: 32 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3055,13 +3055,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>

Expand Down Expand Up @@ -7444,16 +7451,14 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
{
"@context": {
****"@version": 1.1****,
"@base": "http://example.com/posts/",
"schema": "http://schema.org/",
"name": "schema:name",
"body": "schema:articleBody",
"words": "schema:wordCount",
"post": {
"@id": "schema:blogPost",
****"@container": "@id",
"@context": {
"@base": "http://content.com/posts/"
}****
****"@container": "@id"****
}
},
"@id": "http://example.com/",
Expand Down Expand Up @@ -11512,9 +11517,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
Expand Down Expand Up @@ -12020,7 +12026,8 @@ <h2>Context Definitions</h2>
its value MUST be <code>true</code> or <code>false</code>.</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 class="changed">If the <a>context definition</a> has an <code>@version</code> key,
its value MUST be a <a>number</a> with the value <code>1.1</code>.</p>
Expand Down Expand Up @@ -12050,9 +12057,14 @@ <h2>Context Definitions</h2>
<code>@container</code>,
<code class="changed">@context</code>,
<code class="changed">@prefix</code>,
<code class="changed">@propagate</code>, or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did remove @propagate from this list earlier (b4dae4d), because I don't see anything the API where it is expected in an expanded term definition...

Am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I you’re right, only a context definition can contain @propagate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I you’re right, only a context definition can contain @propagate.

<code class="changed">@protected</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
Expand Down Expand Up @@ -12110,13 +12122,21 @@ <h2>Context Definitions</h2>
<p class="changed">If an <a>expanded term definition</a> has an <code>@context</code> <a>entry</a>,
it MUST be a valid <code>context definition</code>.</p>

<p class="changed">If a <a>context</a> contains the <code>@import</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole paragraph is a copy of the one line 12017... Was the intent to replace "context" by "expanded term definition"?? That would be strange as @import can not appear in an expanded term definition...

<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
include an `@import` key, itself.</p>

<p class="changed">If the <a>expanded term definition</a> contains the <code>@nest</code>
<a>keyword</a>, its value MUST be either <code>@nest</code>, or a term
which expands to <code>@nest</code>.</p>

<p class="changed">If the <a>expanded term definition</a> contains the <code>@prefix</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>@propagate</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cf. my comment above, I don't think that an expanded term definition can contain the @propagate keyword...

<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>

Expand Down