@@ -987,6 +987,7 @@ <h3>Algorithm</h3>
987987 < li > Initialize < em > container</ em > to the value associated with the
988988 < code > @container</ code > key, which must be either
989989 < code > @list</ code > , < code > @set</ code > , < code > @index</ code > ,
990+ < span class ="changed "> < code > @id</ code > , < code > @type</ code > </ span >
990991 or < code > @language</ code > . Otherwise, an
991992 < a data-link-for ="JsonLdErrorCode "> invalid container mapping</ a >
992993 has been detected and processing is aborted.</ li >
@@ -1483,9 +1484,10 @@ <h3>Algorithm</h3>
14831484 </ ol >
14841485 </ li >
14851486 < li > Otherwise, if < em > key</ em > 's < a > container mapping</ a > in
1486- < em class ="changed "> term context</ em > is < code > @index</ code > and
1487+ < em class ="changed "> term context</ em > is < code > @index</ code > ,
1488+ < span class ="changed "> < code > @type</ code > , or < code > @id</ code > </ span > and
14871489 < em > value</ em > is a < a > JSON object</ a > then < em > value</ em >
1488- is expanded from an index map as follows:
1490+ is expanded from an map as follows:
14891491 < ol class ="algorithm ">
14901492 < li > Initialize < em > expanded value</ em > to an empty
14911493 < a > array</ a > .</ li >
@@ -1501,11 +1503,23 @@ <h3>Algorithm</h3>
15011503 < em > key</ em > as < a > active property</ a > ,
15021504 and < em > index value</ em > as < em > element</ em > .</ li >
15031505 < li > For each < em > item</ em > in < em > index value</ em > :
1504- < ol class ="algorithm ">
1505- < li > If < em > item</ em > does not have the key
1506+ < ol class ="algorithm changed ">
1507+ < li > If < a > container mapping</ a > is < code > @index</ code >
1508+ and < em > item</ em > does not have the key
15061509 < code > @index</ code > , add the key-value pair
15071510 (< code > @index</ code > -< em > index</ em > ) to
15081511 < em > item</ em > .</ li >
1512+ < li > Otherwise, if < a > container mapping</ a > is < code > @id</ code >
1513+ and < em > item</ em > does not have the key
1514+ < code > @id</ code > , add the key-value pair
1515+ (< code > @id</ code > -< em > index</ em > ) to
1516+ < em > item</ em > .</ li >
1517+ < li > Otherwise, if < a > container mapping</ a > is < code > @type</ code >
1518+ set < em > types</ em > to the concatenation of < em > index
1519+ value</ em > with any existing values of
1520+ < code > @type</ code > in < em > item</ em > and add the
1521+ key-value pair (< code > @type</ code > -< em > types</ em > ) to
1522+ < em > item</ em > .</ li >
15091523 < li > Append < em > item</ em > to < em > expanded value</ em > .</ li >
15101524 </ ol >
15111525 </ li >
@@ -2048,20 +2062,42 @@ <h3>Algorithm</h3>
20482062 </ ol >
20492063 </ li >
20502064 < li >
2051- If < em > container</ em > is < code > @language</ code > or
2052- < code > @index</ code > :
2065+ If < em > container</ em > is < code > @language</ code > ,
2066+ < code > @index</ code > , < span class ="changed "> < code > @id</ code > ,
2067+ or < code > @type</ code > </ span > :
20532068 < ol class ="algorithm ">
20542069 < li > If < em > item active property</ em > is not a key in
20552070 < em class ="changed "> nest result</ em > , initialize it to an empty < a > JSON object</ a > .
20562071 Initialize < em > map object</ em > to the value of < em > item active property</ em >
20572072 in < em class ="changed "> nest result</ em > .</ li >
2073+ < li > Set < em > compacted container</ em > to the result of calling the
2074+ < a href ="#iri-compaction "> IRI Compaction algorithm</ a >
2075+ passing < a > active context</ a > ,
2076+ < em > container</ em > as < em > iri</ em > , and < code > true</ code >
2077+ for < em > vocab</ em > .</ li >
2078+ < li > Initialize < em > map key</ em > to the value associated with
2079+ with the key that equals < em > container</ em > in
2080+ < em > expanded item</ em > .</ li >
20582081 < li > If < em > container</ em > is < code > @language</ code > and
20592082 < em > compacted item</ em > contains the key
20602083 < code > @value</ code > , then set < em > compacted item</ em >
20612084 to the value associated with its < code > @value</ code > key.</ li >
2062- < li > Initialize < em > map key</ em > to the value associated with
2085+ < li > If < em > container</ em > is < code > @index</ code > ,
2086+ set < em > map key</ em > to the value associated with
20632087 with the key that equals < em > container</ em > in
20642088 < em > expanded item</ em > .</ li >
2089+ < li class ="changed "> If < em > container</ em > is < code > @id</ code > , set
2090+ < em > map key</ em > to the value associated with the key that equals
2091+ < em > compacted container</ em > in < em > compacted item</ em >
2092+ and remove that key-value pair from < em > compacted item</ em > .</ li >
2093+ < li class ="changed "> If < em > container</ em > is < code > @type</ code > ,
2094+ set < em > map key</ em > to the first value associated with
2095+ the key that equals < em > container</ em > in < em > expanded
2096+ item</ em > . If there are remaining values in < em > compacted
2097+ item</ em > for < em > compacted container</ em > , set the value
2098+ of < em > compacted container</ em > in < em > compacted
2099+ value</ em > to those remaining values. Otherwise, remove
2100+ that key-value pair from < em > compacted item</ em > .</ li >
20652101 < li > If < em > map key</ em > is not a key in < em > map object</ em > ,
20662102 then set this key's value in < em > map object</ em >
20672103 to < em > compacted item</ em > . Otherwise, if the value
@@ -2338,9 +2374,10 @@ <h3>Algorithm</h3>
23382374 variables will keep track of the preferred
23392375 < a > type mapping</ a > or < a > language mapping</ a > for
23402376 a < a > term</ a > , based on what is compatible with < em > value</ em > .</ li >
2341- < li > If < em > value</ em > is a < a > JSON object</ a > that contains the
2342- key < code > @index</ code > , then append the value < code > @index</ code >
2343- to < em > containers</ em > .</ li >
2377+ < li > If < em > value</ em > is a < a > JSON object</ a > ,
2378+ < span class ="changed "> then for the keywords < code > @index</ code > ,
2379+ < code > @id</ code > , and < code > @type</ code > , if < em > value</ em >
2380+ contains that < a > keyword</ a > , append it to < em > containers</ em > .</ span > </ li >
23442381 < li > If < em > reverse</ em > is < code > true</ code > , set < em > type/language</ em >
23452382 to < code > @type</ code > , < em > type/language value</ em > to
23462383 < code > @reverse</ code > , and append < code > @set</ code > to < em > containers</ em > .</ li >
@@ -4271,6 +4308,8 @@ <h2>Changes since 1.0 Recommendation of 16 January 2014</h2>
42714308 < code > @nest</ code > mapping. When expanding, the values of a property
42724309 expanding to < code > @nest</ code > are treated as if they were contained
42734310 within the enclosing < a > node object</ a > directly.</ li >
4311+ < li > < code > @container</ code > values within an < a > expanded term definition</ a > may now
4312+ include < code > @id</ code > and < code > @type</ code > , corresponding to < a > id maps</ a > and < a > type maps</ a > .</ li >
42744313 </ ul >
42754314</ section >
42764315
0 commit comments