@@ -987,6 +987,7 @@ <h3>Algorithm</h3>
987
987
< li > Initialize < em > container</ em > to the value associated with the
988
988
< code > @container</ code > key, which must be either
989
989
< code > @list</ code > , < code > @set</ code > , < code > @index</ code > ,
990
+ < span class ="changed "> < code > @id</ code > , < code > @type</ code > </ span >
990
991
or < code > @language</ code > . Otherwise, an
991
992
< a data-link-for ="JsonLdErrorCode "> invalid container mapping</ a >
992
993
has been detected and processing is aborted.</ li >
@@ -1470,9 +1471,10 @@ <h3>Algorithm</h3>
1470
1471
</ ol >
1471
1472
</ li >
1472
1473
< li > Otherwise, if < em > key</ em > 's < a > container mapping</ a > in
1473
- < em class ="changed "> term context</ em > is < code > @index</ code > and
1474
+ < em class ="changed "> term context</ em > is < code > @index</ code > ,
1475
+ < span class ="changed "> < code > @type</ code > , or < code > @id</ code > </ span > and
1474
1476
< em > value</ em > is a < a > JSON object</ a > then < em > value</ em >
1475
- is expanded from an index map as follows:
1477
+ is expanded from an map as follows:
1476
1478
< ol class ="algorithm ">
1477
1479
< li > Initialize < em > expanded value</ em > to an empty
1478
1480
< a > array</ a > .</ li >
@@ -1488,11 +1490,23 @@ <h3>Algorithm</h3>
1488
1490
< em > key</ em > as < a > active property</ a > ,
1489
1491
and < em > index value</ em > as < em > element</ em > .</ li >
1490
1492
< li > For each < em > item</ em > in < em > index value</ em > :
1491
- < ol class ="algorithm ">
1492
- < li > If < em > item</ em > does not have the key
1493
+ < ol class ="algorithm changed ">
1494
+ < li > If < a > container mapping</ a > is < code > @index</ code >
1495
+ and < em > item</ em > does not have the key
1493
1496
< code > @index</ code > , add the key-value pair
1494
1497
(< code > @index</ code > -< em > index</ em > ) to
1495
1498
< em > item</ em > .</ li >
1499
+ < li > Otherwise, if < a > container mapping</ a > is < code > @id</ code >
1500
+ and < em > item</ em > does not have the key
1501
+ < code > @id</ code > , add the key-value pair
1502
+ (< code > @id</ code > -< em > index</ em > ) to
1503
+ < em > item</ em > .</ li >
1504
+ < li > Otherwise, if < a > container mapping</ a > is < code > @type</ code >
1505
+ set < em > types</ em > to the concatenation of < em > index
1506
+ value</ em > with any existing values of
1507
+ < code > @type</ code > in < em > item</ em > and add the
1508
+ key-value pair (< code > @type</ code > -< em > types</ em > ) to
1509
+ < em > item</ em > .</ li >
1496
1510
< li > Append < em > item</ em > to < em > expanded value</ em > .</ li >
1497
1511
</ ol >
1498
1512
</ li >
@@ -1994,20 +2008,39 @@ <h3>Algorithm</h3>
1994
2008
</ ol >
1995
2009
</ li >
1996
2010
< li >
1997
- If < em > container</ em > is < code > @language</ code > or
1998
- < code > @index</ code > :
2011
+ If < em > container</ em > is < code > @language</ code > ,
2012
+ < code > @index</ code > , < span class ="changed "> < code > @id</ code > ,
2013
+ or < code > @type</ code > </ span > :
1999
2014
< ol class ="algorithm ">
2000
2015
< li > If < em > item active property</ em > is not a key in
2001
2016
< em > result</ em > , initialize it to an empty < a > JSON object</ a > .
2002
2017
Initialize < em > map object</ em > to the value of < em > item active property</ em >
2003
2018
in < em > result</ em > .</ li >
2019
+ < li > Set < em > compacted container</ em > to the result of calling the
2020
+ < a href ="#iri-compaction "> IRI Compaction algorithm</ a >
2021
+ passing < a > active context</ a > ,
2022
+ < em > container</ em > as < em > iri</ em > , and < code > true</ code >
2023
+ for < em > vocab</ em > .</ li >
2004
2024
< li > If < em > container</ em > is < code > @language</ code > and
2005
2025
< em > compacted item</ em > contains the key
2006
2026
< code > @value</ code > , then set < em > compacted item</ em >
2007
2027
to the value associated with its < code > @value</ code > key.</ li >
2008
- < li > Initialize < em > map key</ em > to the value associated with
2028
+ < li > If < em > container</ em > is < code > @index</ code > ,
2029
+ set < em > map key</ em > to the value associated with
2009
2030
with the key that equals < em > container</ em > in
2010
2031
< em > expanded item</ em > .</ li >
2032
+ < li class ="changed "> If < em > container</ em > is < code > @id</ code > , set
2033
+ < em > map key</ em > to the value associated with the key that equals
2034
+ < em > compacted container</ em > in < em > compacted item</ em >
2035
+ and remove that key-value pair from < em > compacted item</ em > .</ li >
2036
+ < li class ="changed "> If < em > container</ em > is < code > @type</ code > ,
2037
+ set < em > map key</ em > to the first value associated with
2038
+ the key that equals < em > container</ em > in < em > expanded
2039
+ item</ em > . If there are remaining values in < em > compacted
2040
+ item</ em > for < em > compacted container</ em > , set the value
2041
+ of < em > compacted container</ em > in < em > compacted
2042
+ value</ em > to those remaining values. Otherwise, remove
2043
+ that key-value pair from < em > compacted item</ em > .</ li >
2011
2044
< li > If < em > map key</ em > is not a key in < em > map object</ em > ,
2012
2045
then set this key's value in < em > map object</ em >
2013
2046
to < em > compacted item</ em > . Otherwise, if the value
@@ -2284,9 +2317,10 @@ <h3>Algorithm</h3>
2284
2317
variables will keep track of the preferred
2285
2318
< a > type mapping</ a > or < a > language mapping</ a > for
2286
2319
a < a > term</ a > , based on what is compatible with < em > value</ em > .</ li >
2287
- < li > If < em > value</ em > is a < a > JSON object</ a > that contains the
2288
- key < code > @index</ code > , then append the value < code > @index</ code >
2289
- to < em > containers</ em > .</ li >
2320
+ < li > If < em > value</ em > is a < a > JSON object</ a > ,
2321
+ < span class ="changed "> then for the keywords < code > @index</ code > ,
2322
+ < code > @id</ code > , and < code > @type</ code > , if < em > value</ em >
2323
+ contains that < a > keyword</ a > , append it to < em > containers</ em > .</ span > </ li >
2290
2324
< li > If < em > reverse</ em > is < code > true</ code > , set < em > type/language</ em >
2291
2325
to < code > @type</ code > , < em > type/language value</ em > to
2292
2326
< code > @reverse</ code > , and append < code > @set</ code > to < em > containers</ em > .</ li >
@@ -4208,6 +4242,8 @@ <h2>Changes since 1.0 Recommendation of 16 January 2014</h2>
4208
4242
< li > A new < a href ="#merge-node-maps " class ="sectionRef "> </ a > is required
4209
4243
for framing, to create a single graph from the < a data-lt ="default graph "> default</ a >
4210
4244
and < a > named graphs</ a > .</ li >
4245
+ < li > < code > @container</ code > values within an < a > expanded term definition</ a > may now
4246
+ include < code > @id</ code > and < code > @type</ code > , corresponding to < a > id maps</ a > and < a > type maps</ a > .</ li >
4211
4247
</ ul >
4212
4248
</ section >
4213
4249
0 commit comments