@@ -2487,10 +2487,13 @@ <h3>Algorithm</h3>
2487
2487
and `false` for < var > propagate</ var > .</ li >
2488
2488
</ ol >
2489
2489
</ li >
2490
- < li id ="alg-initialize-vars "> Initialize two empty < a class ="changed "> maps</ a > , < var > result</ var >
2490
+ < li id ="alg-expand- initialize-vars "> Initialize two empty < a class ="changed "> maps</ a > , < var > result</ var >
2491
2491
< span class ="changed "> and < var > nests</ var > .
2492
- Initialize < var > input type</ var > to the last value of the first < a > entry</ a > in < var > element</ var >
2492
+ Initialize < var > input type</ var > to expansion of the last value of the first < a > entry</ a > in < var > element</ var >
2493
2493
expanding to < code > @type</ code > (if any), ordering < a > entries</ a > lexicographically by key</ span > .
2494
+ Both the key and value of the matched entry are expanded using the
2495
+ < a href ="#iri-expansion "> IRI Expansion algorithm</ a > ,
2496
+ passing < var > active context</ var > , and < code > true</ code > for < var > vocab</ var > .
2494
2497
</ li >
2495
2498
< li id ="alg-expand-each-key-value ">
2496
2499
For each < var > key</ var > and < var > value</ var > in < var > element</ var > ,
@@ -2606,10 +2609,8 @@ <h3>Algorithm</h3>
2606
2609
< li > If < var > expanded property</ var > is < code > @value</ code > :
2607
2610
< ol >
2608
2611
< li id ="alg-expand-type-json " class ="changed "> If
2609
- < var > input type</ var > is not < code > null</ code > ,
2610
- it was determined in step < a href ="#alg-initialize-vars "> 12</ a >
2611
- that < var > element</ var > is a < a > value object</ a > representing a < a > JSON literal</ a > .
2612
- Set < var > expanded value</ var > to < var > value</ var > .
2612
+ < var > input type</ var > is < code > @json</ code > ,
2613
+ set < var > expanded value</ var > to < var > value</ var > .
2613
2614
If < a > processing mode</ a > is `json-ld-1.0`,
2614
2615
an < a data-link-for ="JsonLdErrorCode "> invalid value object value</ a >
2615
2616
error has been detected and processing is aborted.</ li >
@@ -2762,10 +2763,9 @@ <h3>Algorithm</h3>
2762
2763
< span class ="changed "> and the {{JsonLdOptions/frameExpansion}}
2763
2764
and {{JsonLdOptions/ordered}} flags</ span > .</ li >
2764
2765
< li id ="alg-expand-expanded-property-to-result "> Unless < var > expanded value</ var > is < code > null</ code > ,
2765
- < span class ="changed "> and < var > expanded property</ var > is `@value`,
2766
- and < var > input type</ var > is not < code > null</ code > , it was determined in step < a href ="#alg-initialize-vars "> 12</ a >
2767
- that < var > element</ var > is a < a > value object</ a > representing a < a > JSON literal</ a > .
2768
- Set the < var > expanded property</ var > < a > entry</ a > of < var > result</ var > to
2766
+ < span class ="changed "> < var > expanded property</ var > is < code > @value</ code > ,
2767
+ and < var > input type</ var > is not < code > @json</ code > ,</ span >
2768
+ set the < var > expanded property</ var > < a > entry</ a > of < var > result</ var > to
2769
2769
< var > expanded value</ var > .</ li >
2770
2770
< li > Continue with the next < var > key</ var > from < var > element</ var > .</ li >
2771
2771
</ ol >
@@ -6946,11 +6946,10 @@ <h2>Changes since Candidate Release of 12 December 2019</h2>
6946
6946
of the < a href ="#expansion-algorithm "> Expansion algorithm</ a > to exclude
6947
6947
the < var > expanded index</ var > being `@none`.
6948
6948
This is in response to < a href ="https://github.com/w3c/json-ld-api/issues/264 "> Issue 264</ a > .</ li >
6949
- < li > Updated steps < a href ="#alg-expand-type-json "> 13.4.7.1</ a >
6950
- and < a href ="#alg-expand-expanded-property-to-result "> 13.4.16</ a >
6949
+ < li > Updated step < a href ="#alg-expand-initialize-vars "> 12</ a >
6951
6950
of the
6952
6951
< a href ="#expansion-algorithm "> Expansion algorithm</ a >
6953
- check of < var > input type</ var > is < code > null </ code > , which is a simpler and more correct test .
6952
+ < var > input type</ var > to use the expanded value .
6954
6953
This is in response to < a href ="https://github.com/w3c/json-ld-api/issues/269 "> Issue 269</ a > .</ li >
6955
6954
</ ul >
6956
6955
</ section >
0 commit comments