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
@@ -1073,6 +1091,7 @@ <h3>Algorithm</h3>
1073
1091
For each item < var > context</ var > in < var > local context</ var > :
1074
1092
< ol >
1075
1093
< li > If < var > context</ var > is < code > null</ code > :
1094
+ < details > < summary > clear context (unless protected)</ summary > </ details >
1076
1095
< ol >
1077
1096
< li class ="changed "> If < var > override protected</ var > is < code > false</ code > and < var > active context</ var >
1078
1097
contains any < a > protected</ a > < a > term definitions</ a > ,
@@ -1086,10 +1105,10 @@ <h3>Algorithm</h3>
1086
1105
< span class ="note "> In [[[JSON-LD]]], the < a > base IRI</ a > was given
1087
1106
a default value here; this is now described conditionally
1088
1107
in < a href ="#the-application-programming-interface " class ="sectionRef "> </ a > .</ span > </ li >
1089
- </ ol >
1108
+ </ ol >
1090
1109
</ li >
1091
- < li > If < var > context</ var > is a < a > string</ a > ,
1092
- < ol >
1110
+ < li > If < var > context</ var > is a < a > string</ a > :
1111
+ < details > < summary > dereference and process </ summary > < ol >
1093
1112
< li > Set < var > context</ var > to the result of resolving < var > value</ var > against
1094
1113
the base IRI which is established as specified in
1095
1114
< a data-cite ="RFC3986#section-5.1 "> section 5.1 Establishing a Base URI</ a >
@@ -1129,14 +1148,14 @@ <h3>Algorithm</h3>
1129
1148
passing < var > result</ var > for < var > active context</ var > ,
1130
1149
< var > context</ var > for < var > local context</ var > , and < span class ="changed "> a copy of</ span > < var > remote contexts</ var > .</ li >
1131
1150
< li > Continue with the next < var > context</ var > .</ li >
1132
- </ ol >
1151
+ </ ol > </ details >
1133
1152
</ li >
1134
1153
< li > If < var > context</ var > is not a < a class ="changed "> map</ a > , an
1135
1154
< a data-link-for ="JsonLdErrorCode "> invalid local context</ a >
1136
1155
error has been detected and processing is aborted.</ li >
1137
1156
< li > Otherwise, < var > context</ var > is a < a data-cite ="JSON-LD11#dfn-context-definition "> context definition</ a > .</ li >
1138
1157
< li class ="changed "> If < var > context</ var > has an < code > @version</ code > < a > entry</ a > :
1139
- < ol >
1158
+ < details > < summary > set processing mode </ summary > < ol >
1140
1159
< li > If the associated value is not < code > 1.1</ code > ,
1141
1160
an < a data-link-for ="JsonLdErrorCode "> invalid @version value</ a >
1142
1161
has been detected, and processing is aborted.</ li >
@@ -1146,10 +1165,10 @@ <h3>Algorithm</h3>
1146
1165
error has been detected and processing is aborted.</ li >
1147
1166
< li > Set < a > processing mode</ a > ,
1148
1167
to < code > json-ld-1.1</ code > , if not already set.</ li >
1149
- </ ol >
1168
+ </ ol > </ details >
1150
1169
</ li >
1151
1170
< li class ="changed "> If < var > context</ var > has an < code > @import</ code > < a > entry</ a > :
1152
- < ol >
1171
+ < details > < summary > merge imported context </ summary > < ol >
1153
1172
< li > If < a > processing mode</ a > is < code > json-ld-1.0</ code > ,
1154
1173
an < a data-link-for ="JsonLdErrorCode "> invalid context entry</ a >
1155
1174
error has been detected and processing is aborted.</ li >
@@ -1191,11 +1210,11 @@ <h3>Algorithm</h3>
1191
1210
< li > Set < var > context</ var > to the result of merging < var > context</ var >
1192
1211
into < var > import context</ var > , replacing common entries
1193
1212
with those from < var > context</ var > .</ li >
1194
- </ ol >
1213
+ </ ol > </ details >
1195
1214
</ li >
1196
1215
< li > If < var > context</ var > has an < code > @base</ code > < a > entry</ a > and < var > remote contexts</ var > is empty, i.e., the currently
1197
1216
being processed context is not a remote context:
1198
- < ol >
1217
+ < details > < summary > reset < a > base IRI </ a > </ summary > < ol >
1199
1218
< li > Initialize < var > value</ var > to the value associated with the
1200
1219
< code > @base</ code > < a > entry</ a > .</ li >
1201
1220
< li > If < var > value</ var > is < code > null</ code > , remove the
@@ -1210,10 +1229,10 @@ <h3>Algorithm</h3>
1210
1229
< li > Otherwise, an
1211
1230
< a data-link-for ="JsonLdErrorCode "> invalid base IRI</ a >
1212
1231
error has been detected and processing is aborted.</ li >
1213
- </ ol >
1232
+ </ ol > </ details >
1214
1233
</ li >
1215
1234
< li > If < var > context</ var > has an < code > @vocab</ code > < a > entry</ a > :
1216
- < ol >
1235
+ < details > < summary > reset < a > vocabulary mapping </ a > </ summary > < ol >
1217
1236
< li > Initialize < var > value</ var > to the value associated with the
1218
1237
< code > @vocab</ code > < a > entry</ a > .</ li >
1219
1238
< li > If < var > value</ var > is < a > null</ a > , remove
@@ -1234,10 +1253,10 @@ <h3>Algorithm</h3>
1234
1253
error has been detected and processing is aborted.
1235
1254
< div class ="note "> The use of < a > blank node identifiers</ a > to value for < code > @vocab</ code > is obsolete,
1236
1255
and may be removed in a future version of JSON-LD.</ div > </ li >
1237
- </ ol >
1256
+ </ ol > </ details >
1238
1257
</ li >
1239
1258
< li > If < var > context</ var > has an < code > @language</ code > < a > entry</ a > :
1240
- < ol >
1259
+ < details > < summary > reset < a > default language </ a > </ summary > < ol >
1241
1260
< li > Initialize < var > value</ var > to the value associated with the
1242
1261
< code > @language</ code > < a > entry</ a > .</ li >
1243
1262
< li > If < var > value</ var > is < code > null</ code > , remove
@@ -1247,10 +1266,10 @@ <h3>Algorithm</h3>
1247
1266
lowercased < var > value</ var > . If it is not a < a > string</ a > , an
1248
1267
< a data-link-for ="JsonLdErrorCode "> invalid default language</ a >
1249
1268
error has been detected and processing is aborted.</ li >
1250
- </ ol >
1269
+ </ ol > </ details >
1251
1270
</ li >
1252
1271
< li class ="changed "> If < var > context</ var > has an < code > @propagate</ code > < a > entry</ a > :
1253
- < ol >
1272
+ < details > < summary > check its validity </ summary > < ol >
1254
1273
< li > If < a > processing mode</ a > is < code > json-ld-1.0</ code > ,
1255
1274
an < a data-link-for ="JsonLdErrorCode "> invalid context entry</ a >
1256
1275
error has been detected and processing is aborted.</ li >
@@ -1259,7 +1278,7 @@ <h3>Algorithm</h3>
1259
1278
error has been detected and processing is aborted.</ li >
1260
1279
< li > Otherwise, < a > previous context</ a > was determined before,
1261
1280
and no further processing is necessary.</ li >
1262
- </ ol >
1281
+ </ ol > </ details >
1263
1282
</ li >
1264
1283
< li > Create a < a class ="changed "> map</ a > < var > defined</ var > to keep
1265
1284
track of whether or not a < a > term</ a > has already been defined
0 commit comments