@@ -926,7 +926,7 @@ <h2>Context Processing Algorithm</h2>
926
926
< span class ="changed "> an optional < a > context</ a > </ span > ,
927
927
< span class ="changed "> an optional < dfn > nest value</ dfn > ,</ span >
928
928
< span class ="changed "> an optional < dfn > prefix flag</ dfn > ,</ span >
929
- < span class ="changed "> an optional < dfn > sealed flag </ dfn > ,</ span >
929
+ < span class ="changed "> an optional < dfn > context id </ dfn > , used to flag this as a sealed term ,</ span >
930
930
and an optional < dfn > container mapping</ dfn > .
931
931
A < a > term definition</ a > can not only be used to map a < a > term</ a >
932
932
to an IRI, but also to map a < a > term</ a > to a < a > keyword</ a > ,
@@ -993,31 +993,37 @@ <h3>Overview</h3>
993
993
< h3 > Algorithm</ h3 >
994
994
995
995
< p > This algorithm specifies how a new < a > active context</ a > is updated
996
- with a < a > local context</ a > . The algorithm takes three required
997
- < span class ="changed "> and one optional</ span >
996
+ with a < a > local context</ a > . The algorithm takes two required
997
+ < span class ="changed "> and two optional</ span >
998
998
input variables:
999
- an < var > active context</ var > , a < var > local context</ var > , and an < a > array </ a >
1000
- < var > remote contexts </ var > which is used to detect cyclical context inclusions.
1001
- < span class =" changed " > The optional input is < var > from sealed term </ var > defaulting to < code > false </ code > . </ span >
1002
- If < var > remote contexts</ var > is not passed, it is initialized to an empty
1003
- < a > array</ a > .</ p >
999
+ an < var > active context</ var > and a < var > local context</ var > .
1000
+ < span class =" changed " > The optional inputs are < var > from term </ var > </ span > ,
1001
+ and an < a > array </ a >
1002
+ < var > remote contexts</ var > which is used to detect cyclical context inclusions,
1003
+ which defaults to a new empty < a > array</ a > .</ p >
1004
1004
1005
1005
< ol >
1006
1006
< li > Initialize < var > result</ var > to the result of cloning
1007
1007
< var > active context</ var > .</ li >
1008
+ < li > Initialize < var > current seal</ var > to the value of < a > context id</ a >
1009
+ from the term definition for < var > from term</ var > ,
1010
+ if such a term definition exists.</ li >
1008
1011
< li > If < var > local context</ var > is not an < a > array</ a > ,
1009
1012
set it to an < a > array</ a > containing only
1010
1013
< var > local context</ var > .</ li >
1011
1014
< li >
1012
1015
For each item < var > context</ var > in < var > local context</ var > :
1013
1016
< ol >
1017
+ < li class ="changed "> Initialize < var > context id</ var > to a unique identifier.
1018
+ < span class ="note "> < var > context id</ var > is used to identify sealed terms
1019
+ created from the same context.</ span > </ li >
1014
1020
< li > If < var > context</ var > is < code > null</ code >
1015
- < span class ="changed "> and < var > from sealed term</ var > is < code > true</ code >
1016
- or the < var > active context</ var > contains no < a > term definition</ a >
1017
- with a < a > sealed flag</ a > of < code > true</ code > </ span > ,
1021
+ < span class ="changed "> and < var > current seal</ var > is < code > null</ code > </ span > ,
1018
1022
set < var > result</ var > to a
1019
1023
newly-initialized < var > active context</ var > and continue with the
1020
1024
next < var > context</ var > .
1025
+ < span class ="changed "> If < var > current seal</ var > is < code > null</ code > ,
1026
+ processors SHOULD issue a warning that an attempt to clear a sealed context was attempted.</ span >
1021
1027
< span class ="note "> In JSON-LD 1.0, the < a > base IRI</ a > was given
1022
1028
a default value here; this is now described conditionally
1023
1029
in < a href ="#the-application-programming-interface " class ="sectionRef "> </ a > .</ span > </ li >
@@ -1141,8 +1147,9 @@ <h3>Algorithm</h3>
1141
1147
passing < var > result</ var > for < var > active context</ var > ,
1142
1148
< var > context</ var > for < var > local context</ var > , < var > key</ var > ,
1143
1149
< var > defined</ var > ,
1144
- < span class ="changed "> and the value of the < code > @sealed</ code >
1145
- member from < var > context</ var > , if any, for < var > sealed</ var > </ span > .</ li >
1150
+ < span class ="changed "> the value of the < code > @sealed</ code >
1151
+ member from < var > context</ var > , if any, for < var > sealed</ var > </ span > ,
1152
+ < var > current seal</ var > , and < var > context id</ var > .</ li >
1146
1153
</ ol >
1147
1154
</ li >
1148
1155
< li > Return < var > result</ var > .</ li >
@@ -1187,11 +1194,13 @@ <h3>Overview</h3>
1187
1194
< section class ="algorithm ">
1188
1195
< h3 > Algorithm</ h3 >
1189
1196
1190
- < p > The algorithm has four required < span class ="changed "> and one optional</ span > inputs which are:
1197
+ < p > The algorithm has four required < span class ="changed "> and three optional</ span > inputs.
1198
+ The required inputs are:
1191
1199
an < var > active context</ var > , a < var > local context</ var > ,
1192
1200
a < var > term</ var > , and a map < var > defined</ var > .
1193
- < span class ="changed "> The optional input is < var > sealed</ var > which defaults to < code > false</ code > .</ span > </ p >
1194
-
1201
+ < span class ="changed "> The optional inputs are
1202
+ < var > sealed</ var > which defaults to < code > false</ code > ,
1203
+ < var > current seal</ var > , and < var > context id</ var > , which default to < code > null</ code > .</ span > </ p >
1195
1204
< ol >
1196
1205
< li > If < var > defined</ var > contains the < a > member</ a > < var > term</ var > and the associated
1197
1206
value is < code > true</ code > (indicating that the
@@ -1216,8 +1225,9 @@ <h3>Algorithm</h3>
1216
1225
< a data-link-for ="JsonLdErrorCode "> keyword redefinition</ a >
1217
1226
error has been detected and processing is aborted.</ li >
1218
1227
< li class ="changed "> If the < var > active context</ var > has an existing
1219
- < a > term definition</ a > for < var > term</ var > with the < a > sealed flag</ a > set to < code > true</ code >
1220
- processing is aborted.</ li >
1228
+ < a > term definition</ a > for < var > term</ var > with a non-null < a > context id</ a > ,
1229
+ and < var > current seal</ var > is not < code > null</ code > , processing is aborted;
1230
+ processors SHOULD issue a warning that an attempt was made to redefine a sealed term.</ li >
1221
1231
< li > Otherwise, remove any existing < a > term definition</ a > for < var > term</ var > in
1222
1232
< var > active context</ var > .</ li >
1223
1233
< li > If < var > value</ var > is < code > null</ code > or < var > value</ var >
@@ -1235,9 +1245,11 @@ <h3>Algorithm</h3>
1235
1245
error has been detected and processing is aborted.
1236
1246
< span class ="changed "> Set < var > simple term</ var > to < code > false</ code > </ span > .</ li >
1237
1247
< li > Create a new < a > term definition</ a > , < var > definition</ var > .</ li >
1238
- < li class ="changed "> Set the < a > sealed flag</ a > in < var > definition</ var >
1239
- to the value of the < code > @sealed</ code > member in < var > value</ var > ,
1240
- if any, or to the value of < var > sealed</ var > otherwise.</ li >
1248
+ < li class ="changed "> If the < code > @sealed</ code > member in < var > value</ var >
1249
+ is < code > true</ code > , or there is no < code > @sealed</ code > member in < var > value</ var >
1250
+ and the < var > sealed</ var > parameter is < code > true</ code > ,
1251
+ set the < a > context id</ a > in < var > definition</ var >
1252
+ to the value of the < var > context id</ var > parameter.</ li >
1241
1253
< li > If < var > value</ var > contains the < a > member</ a > < code > @type</ code > :
1242
1254
< ol >
1243
1255
< li > Initialize < var > type</ var > to the value associated with the
@@ -1698,8 +1710,9 @@ <h3>Algorithm</h3>
1698
1710
< li > If < var > element</ var > contains the < a > member</ a > < code > @context</ code > , set
1699
1711
< var > active context</ var > to the result of the
1700
1712
< a href ="#context-processing-algorithm "> Context Processing algorithm</ a > ,
1701
- passing < var > active context</ var > and the value of the
1702
- < code > @context</ code > < a > member</ a > as < var > local context</ var > .</ li >
1713
+ passing < var > active context</ var > , the value of the
1714
+ < code > @context</ code > < a > member</ a > as < var > local context</ var > ,
1715
+ < span class ="changed "> and < var > active property</ var > as < var > from term</ var > </ span > .</ li >
1703
1716
< li class ="changed "> For each < var > key</ var > /< var > value</ var > pair in < var > element</ var >
1704
1717
where < var > key</ var > expands to < code > @type</ code > using the
1705
1718
< a href ="#iri-expansion "> IRI Expansion algorithm</ a > ,
@@ -1713,9 +1726,7 @@ <h3>Algorithm</h3>
1713
1726
< a href ="#context-processing-algorithm "> Context Processing algorithm</ a > ,
1714
1727
passing < var > active context</ var > , the value of the
1715
1728
< var > term</ var > 's < a > local context</ a > as < var > local context</ var > ,
1716
- < span class ="changed "> and < var > from sealed term</ var > set to the value
1717
- of the < a > sealed flag</ a > from
1718
- < var > term</ var > 's < a > term definition</ a > in < var > active context</ var > </ span > .</ li >
1729
+ < span class ="changed "> and < var > active property</ var > as < var > from term</ var > </ span > .</ li >
1719
1730
</ ol >
1720
1731
</ li >
1721
1732
< li > Initialize an empty < a class ="changed "> dictionary</ a > , < var > result</ var > .</ li >
@@ -1902,11 +1913,10 @@ <h3>Algorithm</h3>
1902
1913
< li class ="changed "> If < var > key</ var > 's < a > term definition</ a > in < var > active context</ var >
1903
1914
has a < a > local context</ a > , set < var > term context</ var > to the result of the
1904
1915
< a href ="#context-processing-algorithm "> Context Processing algorithm</ a > ,
1905
- passing < var > active context</ var > , the value of the
1906
- < var > key</ var > 's < a > local context</ a > as < var > local context</ var > ,
1907
- < span class ="changed "> and < var > from sealed term</ var > set to the value
1908
- of the < a > sealed flag</ a > from
1909
- < var > key</ var > 's < a > term definition</ a > in < var > active context</ var > </ span > .
1916
+ passing < var > active context</ var > and the value of the
1917
+ < var > key</ var > 's < a > local context</ a > as < var > local context</ var > .
1918
+ < span class ="changed note "> The < var > from term</ var > is not passed,
1919
+ as scoped contexts may redefine sealed terms.</ span >
1910
1920
Otherwise, set < var > term context</ var > to < var > active context</ var > .</ li >
1911
1921
< li > Set < var > container mapping</ var > to < var > key</ var > 's < a > container mapping</ a > in
1912
1922
< var class ="changed "> term context</ var > .</ li >
@@ -1964,9 +1974,7 @@ <h3>Algorithm</h3>
1964
1974
algorithm</ a > , passing < var > term context</ var > as < var > active context</ var > , the
1965
1975
value of the < var > index</ var > 's < a > local context</ a > as
1966
1976
< var > local context</ var > ,
1967
- < span class ="changed "> and < var > from sealed term</ var > set to the value
1968
- of the < a > sealed flag</ a > from
1969
- < var > index</ var > 's < a > term definition</ a > in < var > active context</ var > </ span > .
1977
+ < span class ="changed "> and < var > active property</ var > as < var > from term</ var > </ span > .
1970
1978
Otherwise, set < var > map context</ var >
1971
1979
to < var > term context</ var > .</ li >
1972
1980
< li > Set < var > expanded index</ var > to the result of using the
@@ -2341,8 +2349,9 @@ <h3>Algorithm</h3>
2341
2349
< ol >
2342
2350
< li > Set < var > active context</ var > to the result of the
2343
2351
< a href ="#context-processing-algorithm "> Context Processing algorithm</ a > ,
2344
- passing < var > active context</ var > and the value of the
2345
- < var > active property</ var > 's < a > local context</ a > as < var > local context</ var > .</ li >
2352
+ passing < var > active context</ var > , the value of the
2353
+ < var > active property</ var > 's < a > local context</ a > as < var > local context</ var > ,
2354
+ < span class ="changed "> and < var > active property</ var > as < var > from term</ var > </ span > .</ li >
2346
2355
< li > Set < var > inverse context</ var > using the
2347
2356
< a href ="#inverse-context-creation "> Inverse Context Creation algorithm</ a >
2348
2357
using < var > active context</ var > .</ li >
@@ -2411,8 +2420,9 @@ <h3>Algorithm</h3>
2411
2420
< ol >
2412
2421
< li > Set < var > active context</ var > to the result of the
2413
2422
< a href ="#context-processing-algorithm "> Context Processing algorithm</ a > ,
2414
- passing < var > active context</ var > and the value of < var > term</ var > 's
2415
- < a > local context</ a > as < var > local context</ var > .</ li >
2423
+ passing < var > active context</ var > , the value of < var > term</ var > 's
2424
+ < a > local context</ a > as < var > local context</ var >
2425
+ < span class ="changed "> and < var > active property</ var > as < var > from term</ var > </ span > .</ li >
2416
2426
< li > Set < var > inverse context</ var > using the
2417
2427
< a href ="#inverse-context-creation "> Inverse Context Creation algorithm</ a >
2418
2428
using < var > active context</ var > .</ li >
0 commit comments