264
264
text-decoration : none;
265
265
color : # 666 ;
266
266
}
267
+
268
+ .algorithm summary ::before {
269
+ content : "// " ;
270
+ }
271
+
272
+ .algorithm summary {
273
+ padding-left : 2em ;
274
+ font-style : italic;
275
+ }
276
+
277
+ /* required if we chose to put OLs *outside* the details,
278
+ to force them visible when printing */
279
+ @media screen {
280
+ .algorithm details : not ([open ]) + ol {
281
+ display : none;
282
+ }
283
+ }
284
+
267
285
</ style >
268
286
</ head >
269
287
@@ -1125,6 +1143,7 @@ <h3>Algorithm</h3>
1125
1143
For each item < var > context</ var > in < var > local context</ var > :
1126
1144
< ol >
1127
1145
< li > If < var > context</ var > is < code > null</ code > :
1146
+ < details > < summary > clear context (unless protected)</ summary > </ details >
1128
1147
< ol >
1129
1148
< li class ="changed "> If < var > override protected</ var > is < code > false</ code > and < var > active context</ var >
1130
1149
contains any < a > protected</ a > < a > term definitions</ a > ,
@@ -1138,10 +1157,10 @@ <h3>Algorithm</h3>
1138
1157
< span class ="note "> In [[[JSON-LD]]], the < a > base IRI</ a > was given
1139
1158
a default value here; this is now described conditionally
1140
1159
in < a href ="#the-application-programming-interface " class ="sectionRef "> </ a > .</ span > </ li >
1141
- </ ol >
1160
+ </ ol >
1142
1161
</ li >
1143
- < li > If < var > context</ var > is a < a > string</ a > ,
1144
- < ol >
1162
+ < li > If < var > context</ var > is a < a > string</ a > :
1163
+ < details > < summary > dereference and process </ summary > < ol >
1145
1164
< li > Set < var > context</ var > to the result of resolving < var > value</ var > against
1146
1165
the base IRI which is established as specified in
1147
1166
< a data-cite ="RFC3986#section-5.1 "> section 5.1 Establishing a Base URI</ a >
@@ -1180,14 +1199,14 @@ <h3>Algorithm</h3>
1180
1199
passing < var > result</ var > for < var > active context</ var > ,
1181
1200
< var > context</ var > for < var > local context</ var > , and < span class ="changed "> a copy of</ span > < var > remote contexts</ var > .</ li >
1182
1201
< li > Continue with the next < var > context</ var > .</ li >
1183
- </ ol >
1202
+ </ ol > </ details >
1184
1203
</ li >
1185
1204
< li > If < var > context</ var > is not a < a class ="changed "> map</ a > , an
1186
1205
< a data-link-for ="JsonLdErrorCode "> invalid local context</ a >
1187
1206
error has been detected and processing is aborted.</ li >
1188
1207
< li > Otherwise, < var > context</ var > is a < a data-cite ="JSON-LD11#dfn-context-definition "> context definition</ a > .</ li >
1189
1208
< li class ="changed "> If < var > context</ var > has an < code > @version</ code > < a > entry</ a > :
1190
- < ol >
1209
+ < details > < summary > set processing mode </ summary > < ol >
1191
1210
< li > If the associated value is not < code > 1.1</ code > ,
1192
1211
an < a data-link-for ="JsonLdErrorCode "> invalid @version value</ a >
1193
1212
has been detected, and processing is aborted.</ li >
@@ -1197,10 +1216,10 @@ <h3>Algorithm</h3>
1197
1216
error has been detected and processing is aborted.</ li >
1198
1217
< li > Set < a > processing mode</ a > ,
1199
1218
to < code > json-ld-1.1</ code > , if not already set.</ li >
1200
- </ ol >
1219
+ </ ol > </ details >
1201
1220
</ li >
1202
1221
< li class ="changed "> If < var > context</ var > has an < code > @import</ code > < a > entry</ a > :
1203
- < ol >
1222
+ < details > < summary > merge imported context </ summary > < ol >
1204
1223
< li > If < a > processing mode</ a > is < code > json-ld-1.0</ code > ,
1205
1224
an < a data-link-for ="JsonLdErrorCode "> invalid context entry</ a >
1206
1225
error has been detected and processing is aborted.</ li >
@@ -1241,11 +1260,11 @@ <h3>Algorithm</h3>
1241
1260
< li > Set < var > context</ var > to the result of merging < var > context</ var >
1242
1261
into < var > import context</ var > , replacing common entries
1243
1262
with those from < var > context</ var > .</ li >
1244
- </ ol >
1263
+ </ ol > </ details >
1245
1264
</ li >
1246
1265
< li > If < var > context</ var > has an < code > @base</ code > < a > entry</ a > and < var > remote contexts</ var > is empty, i.e., the currently
1247
1266
being processed context is not a remote context:
1248
- < ol >
1267
+ < details > < summary > reset < a > base IRI </ a > </ summary > < ol >
1249
1268
< li > Initialize < var > value</ var > to the value associated with the
1250
1269
< code > @base</ code > < a > entry</ a > .</ li >
1251
1270
< li > If < var > value</ var > is < code > null</ code > , remove the
@@ -1260,10 +1279,10 @@ <h3>Algorithm</h3>
1260
1279
< li > Otherwise, an
1261
1280
< a data-link-for ="JsonLdErrorCode "> invalid base IRI</ a >
1262
1281
error has been detected and processing is aborted.</ li >
1263
- </ ol >
1282
+ </ ol > </ details >
1264
1283
</ li >
1265
1284
< li > If < var > context</ var > has an < code > @vocab</ code > < a > entry</ a > :
1266
- < ol >
1285
+ < details > < summary > reset < a > vocabulary mapping </ a > </ summary > < ol >
1267
1286
< li > Initialize < var > value</ var > to the value associated with the
1268
1287
< code > @vocab</ code > < a > entry</ a > .</ li >
1269
1288
< li > If < var > value</ var > is < a > null</ a > , remove
@@ -1284,10 +1303,10 @@ <h3>Algorithm</h3>
1284
1303
error has been detected and processing is aborted.
1285
1304
< div class ="issue atrisk "> The use of < a > blank node identifiers</ a > to value for < code > @vocab</ code > is obsolete,
1286
1305
and may be removed in a future version of JSON-LD.</ div > </ li >
1287
- </ ol >
1306
+ </ ol > </ details >
1288
1307
</ li >
1289
1308
< li > If < var > context</ var > has an < code > @language</ code > < a > entry</ a > :
1290
- < ol >
1309
+ < details > < summary > reset < a > default language </ a > </ summary > < ol >
1291
1310
< li > Initialize < var > value</ var > to the value associated with the
1292
1311
< code > @language</ code > < a > entry</ a > .</ li >
1293
1312
< li > If < var > value</ var > is < code > null</ code > , remove
@@ -1297,10 +1316,10 @@ <h3>Algorithm</h3>
1297
1316
lowercased < var > value</ var > . If it is not a < a > string</ a > , an
1298
1317
< a data-link-for ="JsonLdErrorCode "> invalid default language</ a >
1299
1318
error has been detected and processing is aborted.</ li >
1300
- </ ol >
1319
+ </ ol > </ details >
1301
1320
</ li >
1302
1321
< li class ="changed "> If < var > context</ var > has an < code > @propagate</ code > < a > entry</ a > :
1303
- < ol >
1322
+ < details > < summary > check its validity </ summary > < ol >
1304
1323
< li > If < a > processing mode</ a > is < code > json-ld-1.0</ code > ,
1305
1324
an < a data-link-for ="JsonLdErrorCode "> invalid context entry</ a >
1306
1325
error has been detected and processing is aborted.</ li >
@@ -1309,7 +1328,7 @@ <h3>Algorithm</h3>
1309
1328
error has been detected and processing is aborted.</ li >
1310
1329
< li > Otherwise, < a > previous context</ a > was determined before,
1311
1330
and no further processing is necessary.</ li >
1312
- </ ol >
1331
+ </ ol > </ details >
1313
1332
</ li >
1314
1333
< li > Create a < a class ="changed "> map</ a > < var > defined</ var > to keep
1315
1334
track of whether or not a < a > term</ a > has already been defined
0 commit comments