Skip to content

Commit 4dbb5dc

Browse files
committed
Update Create Term Definition to allow for the redefinition of identical protected terms.
Note that the algorithm sets terms to `null` in context if they're defined as `null` or `{"@id": null}` and doesn't retain the protected status, which it probably should.
1 parent 929713f commit 4dbb5dc

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

index.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,10 +1332,6 @@ <h3>Algorithm</h3>
13321332
error has been detected and processing is aborted.</li>
13331333
<li class="changed">Set <var>previous definition</var> to any existing
13341334
<a>term definition</a> for <var>term</var> in <var>active context</var>.</li>
1335-
<li class="changed">If <var>from property</var> is <code>false</code>
1336-
and <var>previous definition</var> exists and is protected,
1337-
a <a data-link-for="JsonLdErrorCode">protected term redefinition</a> error has been detected,
1338-
and processing is aborted.</li>
13391335
<li>Otherwise, remove any <var>previous definition</var> from
13401336
<var>active context</var>.</li>
13411337
<li>If <var>value</var> is <code>null</code> or <var>value</var>
@@ -1344,7 +1340,9 @@ <h3>Algorithm</h3>
13441340
<a>term definition</a> in <var>active context</var> to
13451341
<code>null</code>,
13461342
and set the value associated with <var>defined</var>'s
1347-
<a>member</a> <var>term</var> to <code>true</code>, and return.</li>
1343+
<a>member</a> <var>term</var> to <code>true</code>, and return.
1344+
<div class="ednote">Should probably store as a dictionary with <code>@id</code>-<code>null</code>
1345+
and retain <code>@protected</code> so we can protect against redefinitions.</div></li>
13481346
<li>Otherwise, if <var>value</var> is a <a>string</a>, convert it
13491347
to a <a class="changed">dictionary</a> consisting of a single <a>member</a> whose
13501348
key is <code>@id</code> and whose value is <var>value</var>.
@@ -1580,6 +1578,17 @@ <h3>Algorithm</h3>
15801578
<code class="changed">@prefix</code>, or <code>@type</code>, an
15811579
<a data-link-for="JsonLdErrorCode">invalid term definition</a> error has
15821580
been detected and processing is aborted.</li>
1581+
<li class="changed">If <var>from property</var> is <code>false</code>
1582+
and <var>previous definition</var> exists and is protected;
1583+
<ol>
1584+
<li>If <var>definition</var> is not the same as <var>previous definition</var>
1585+
(other than the value of <a>protected</a>),
1586+
a <a data-link-for="JsonLdErrorCode">protected term redefinition</a> error has been detected,
1587+
and processing is aborted.</li>
1588+
<li>Set <var>definition</var> to <var>previous definition</var> to retain the value
1589+
of <a>protected</a>.</li>
1590+
</ol>
1591+
</li>
15831592
<li>Set the <a>term definition</a> of <var>term</var> in
15841593
<var>active context</var> to <var>definition</var> and set the value
15851594
associated with <var>defined</var>'s <a>member</a> <var>term</var> to

0 commit comments

Comments
 (0)