@@ -1011,11 +1011,14 @@ <h3>Algorithm</h3>
1011
1011
1012
1012
< p > This algorithm specifies how a new < a > active context</ a > is updated
1013
1013
with a < a > local context</ a > . The algorithm takes two required
1014
- < span class ="changed "> and one optional</ span >
1014
+ < span class ="changed "> and two optional</ span >
1015
1015
input variables.
1016
- The required inputs inputs are an < var > active context</ var > and a < var > local context</ var > .
1017
- The optional input is an < a > array</ a > < var > remote contexts</ var > ,
1018
- defaulting to a new empty < a > array</ a > , which is used to detect cyclical context inclusions.</ p >
1016
+ The required inputs are an < var > active context</ var > and a < var > local context</ var > .
1017
+ The optional inputs are an < a > array</ a > < var > remote contexts</ var > ,
1018
+ defaulting to a new empty < a > array</ a > , which is used to detect cyclical context inclusions.
1019
+ < span class ="changed "> and < var > from term</ var > , defaulting to < code > false</ code > ,
1020
+ which is used to allow changes to protected terms.</ span > .
1021
+ </ p >
1019
1022
1020
1023
< ol >
1021
1024
< li > Initialize < var > result</ var > to the result of cloning
@@ -1026,12 +1029,20 @@ <h3>Algorithm</h3>
1026
1029
< li >
1027
1030
For each item < var > context</ var > in < var > local context</ var > :
1028
1031
< ol >
1029
- < li > If < var > context</ var > is < code > null</ code > , set < var > result</ var > to a
1030
- newly-initialized < var > active context</ var > and continue with the
1031
- next < var > context</ var > .
1032
- < span class ="note "> In JSON-LD 1.0, the < a > base IRI</ a > was given
1033
- a default value here; this is now described conditionally
1034
- in < a href ="#the-application-programming-interface " class ="sectionRef "> </ a > .</ span > </ li >
1032
+ < li > If < var > context</ var > is < code > null</ code > :
1033
+ < ol >
1034
+ < li class ="changed "> If < var > from term</ var > is < code > false</ code > and < var > active context</ var >
1035
+ contains any < a > protected</ a > < a > term definitions</ a > ,
1036
+ an < a data-link-for ="JsonLdErrorCode "> invalid context nullification</ a >
1037
+ has been detected and processing is aborted.</ li >
1038
+ < li > Otherwise, set < var > result</ var > to a
1039
+ newly-initialized < var > active context</ var > and continue with the
1040
+ next < var > context</ var > .
1041
+ < span class ="note "> In JSON-LD 1.0, the < a > base IRI</ a > was given
1042
+ a default value here; this is now described conditionally
1043
+ in < a href ="#the-application-programming-interface " class ="sectionRef "> </ a > .</ span > </ li >
1044
+ </ ol >
1045
+ </ li >
1035
1046
< li > If < var > context</ var > is a < a > string</ a > ,
1036
1047
< ol >
1037
1048
< li > Set < var > context</ var > to the result of resolving < var > value</ var > against
@@ -1153,8 +1164,9 @@ <h3>Algorithm</h3>
1153
1164
passing < var > result</ var > for < var > active context</ var > ,
1154
1165
< var > context</ var > for < var > local context</ var > , < var > key</ var > ,
1155
1166
< var > defined</ var > ,
1156
- < span class ="changed "> and the value of the < code > @protected</ code >
1157
- member from < var > context</ var > , if any, for < var > protected</ var > </ span > .</ li >
1167
+ < span class ="changed "> the value of the < code > @protected</ code >
1168
+ member from < var > context</ var > , if any, for < var > protected</ var > </ span > ,
1169
+ and < var > from term</ var > .</ li >
1158
1170
</ ol >
1159
1171
</ li >
1160
1172
< li > Return < var > result</ var > .</ li >
@@ -1199,12 +1211,15 @@ <h3>Overview</h3>
1199
1211
< section class ="algorithm ">
1200
1212
< h3 > Algorithm</ h3 >
1201
1213
1202
- < p > The algorithm has four required < span class ="changed "> and one optional</ span > inputs.
1214
+ < p > The algorithm has four required < span class ="changed "> and two optional</ span > inputs.
1203
1215
The required inputs are
1204
1216
an < var > active context</ var > , a < var > local context</ var > ,
1205
1217
a < var > term</ var > , and a map < var > defined</ var > .
1206
- < span class ="changed "> The optional input is
1207
- < var > protected</ var > which defaults to < code > false</ code > .</ span > </ p >
1218
+ < span class ="changed "> The optional inputs are
1219
+ < var > protected</ var > which defaults to < code > false</ code > ,
1220
+ and < var > from term</ var > , defaulting to < code > false</ code > ,
1221
+ which is used to allow changes to protected terms.</ span > .
1222
+ </ p >
1208
1223
< ol >
1209
1224
< li > If < var > defined</ var > contains the < a > member</ a > < var > term</ var > and the associated
1210
1225
value is < code > true</ code > (indicating that the
@@ -1228,9 +1243,11 @@ <h3>Algorithm</h3>
1228
1243
< var > term</ var > MUST NOT be a < a > keyword</ a > and a
1229
1244
< a data-link-for ="JsonLdErrorCode "> keyword redefinition</ a >
1230
1245
error has been detected and processing is aborted.</ li >
1231
- < li class ="changed "> If the < var > active context</ var > has an existing
1232
- < a > term definition</ a > for < var > term</ var > which is protected, processing is aborted;
1233
- processors SHOULD issue a warning that an attempt was made to redefine a protected term.</ li >
1246
+ < li class ="changed "> If the < var > from term</ var > is < code > false</ code >
1247
+ and < var > active context</ var > has an existing
1248
+ < a > term definition</ a > for < var > term</ var > which is protected,
1249
+ a < a data-link-for ="JsonLdErrorCode "> protected term redefinition</ a > error has been detected,
1250
+ and processing is aborted.</ li >
1234
1251
< li > Otherwise, remove any existing < a > term definition</ a > for < var > term</ var > in
1235
1252
< var > active context</ var > .</ li >
1236
1253
< li > If < var > value</ var > is < code > null</ code > or < var > value</ var >
@@ -1412,7 +1429,8 @@ <h3>Algorithm</h3>
1412
1429
< li > Initialize < var > context</ var > to the value associated with the
1413
1430
< code > @context</ code > < a > member</ a > , which is treated as a < var > local context</ var > .</ li >
1414
1431
< li > Invoke the < a href ="#context-processing-algorithm "> Context Processing algorithm</ a >
1415
- using the < var > active context</ var > and < var > context</ var > as < var > local context</ var > .
1432
+ using the < var > active context</ var > , < var > context</ var > as < var > local context</ var > ,
1433
+ and < code > true</ code > for < var > from term</ var > .
1416
1434
If any error is detected, an
1417
1435
< a data-link-for ="JsonLdErrorCode "> invalid scoped context</ a > error
1418
1436
has been detected and processing is aborted.</ li >
@@ -1514,7 +1532,7 @@ <h3>Overview</h3>
1514
1532
< a href ="#create-term-definition "> Create Term Definition algorithm</ a > .</ p >
1515
1533
</ section >
1516
1534
1517
- < section >
1535
+ < section class =" algorithm " >
1518
1536
< h3 > Algorithm</ h3 >
1519
1537
1520
1538
< p > The algorithm takes two required and four optional input variables. The
@@ -1938,8 +1956,9 @@ <h3>Algorithm</h3>
1938
1956
< li class ="changed "> If < var > key</ var > 's < a > term definition</ a > in < var > active context</ var >
1939
1957
has a < a > local context</ a > , set < var > term context</ var > to the result of the
1940
1958
< a href ="#context-processing-algorithm "> Context Processing algorithm</ a > ,
1941
- passing < var > active context</ var > and the value of the
1942
- < var > key</ var > 's < a > local context</ a > as < var > local context</ var > . Otherwise,
1959
+ passing < var > active context</ var > , the value of the
1960
+ < var > key</ var > 's < a > local context</ a > as < var > local context</ var > ,
1961
+ and < code > true</ code > for < var > from term</ var > . Otherwise,
1943
1962
set < var > term context</ var > to < var > active context</ var > .</ li >
1944
1963
< li > Set < var > container mapping</ var > to < var > key</ var > 's < a > container mapping</ a > in
1945
1964
< var class ="changed "> term context</ var > .</ li >
@@ -5626,6 +5645,7 @@ <h4>JsonLdErrorCode</h4>
5626
5645
"invalid @version value",
5627
5646
"invalid base IRI",
5628
5647
"invalid container mapping",
5648
+ "invalid context nullification",
5629
5649
"invalid default language",
5630
5650
"invalid IRI mapping",
5631
5651
"invalid keyword alias",
@@ -5653,6 +5673,7 @@ <h4>JsonLdErrorCode</h4>
5653
5673
"loading remote context failed",
5654
5674
"multiple context link headers",
5655
5675
"processing mode conflict",
5676
+ "protected term redefinition",
5656
5677
"context overflow"
5657
5678
};
5658
5679
--> </ pre >
@@ -5769,6 +5790,11 @@ <h4>JsonLdErrorCode</h4>
5769
5790
which is incompatible with the previous specified version.</ dd >
5770
5791
< dt > < dfn > context overflow</ dfn > </ dt >
5771
5792
< dd > maximum number of < code > @context</ code > URLs exceeded.</ dd >
5793
+ < dt class ="changed "> < dfn > invalid context nullification</ dfn > </ dt >
5794
+ < dd class ="changed "> An attempt was made to nullify a context
5795
+ containing < a > protected</ a > < a > term definitions</ a > .</ dd >
5796
+ < dt class ="changed "> < dfn > protected term redefinition</ dfn > </ dt >
5797
+ < dd class ="changed "> An attempt was made to redefine a < a > protected</ a > term.</ dd >
5772
5798
</ dl >
5773
5799
</ section >
5774
5800
</ section > <!-- end of Error Handling -->
0 commit comments