From 238c5dcb1ddb90b4944b153fccfe3f190dfad046 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 23 Dec 2019 13:13:53 -0800 Subject: [PATCH 1/6] Update expansion to expand _input type_ before comparing with `@type`. For #269. --- index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 78e1f596..636ea8d7 100644 --- a/index.html +++ b/index.html @@ -2605,7 +2605,13 @@

Algorithm

  • If expanded property is @value:
      -
    1. If input type is @json, +
    2. If + the result of using the + IRI Expansion algorithm, + passing active context, + input type for value, + and true for vocab + is @json, set expanded value to value. If processing mode is `json-ld-1.0`, an invalid value object value @@ -6942,6 +6948,10 @@

      Changes since Candidate Release of 12 December 2019

      of the Expansion algorithm to exclude the expanded index being `@none`. This is in response to Issue 264.
    3. +
    4. Updated step 13.4.7.1 of the + Expansion algorithm + to expand input type before comparing to @json. + This is in response to Issue 269.
    5. From f678b25b4ee892dcf777bf1b6e69f6f200b437fa Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 23 Dec 2019 13:23:54 -0800 Subject: [PATCH 2/6] Instead of expanding _input type_ again, simply check that it is not null, as _input type_ is only set when the value expands to `@json`. --- index.html | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.html b/index.html index 636ea8d7..8cd055d3 100644 --- a/index.html +++ b/index.html @@ -2606,12 +2606,7 @@

      Algorithm

    6. If expanded property is @value:
      1. If - the result of using the - IRI Expansion algorithm, - passing active context, - input type for value, - and true for vocab - is @json, + input type is not null, set expanded value to value. If processing mode is `json-ld-1.0`, an invalid value object value From 0621eb3cc89b2686635f68bbdcbb400470674f16 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 23 Dec 2019 13:30:52 -0800 Subject: [PATCH 3/6] Add some explanatory text and update changes since CR. --- index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8cd055d3..e8cbd204 100644 --- a/index.html +++ b/index.html @@ -2487,7 +2487,7 @@

        Algorithm

        and `false` for propagate.
    7. -
    8. Initialize two empty maps, result +
    9. Initialize two empty maps, result and nests. Initialize input type to the last value of the first entry in element expanding to @type (if any), ordering entries lexicographically by key. @@ -2607,7 +2607,9 @@

      Algorithm

      1. If input type is not null, - set expanded value to value. + it was determined in step 12 + that element is a value object representing a JSON literal. + Set expanded value to value. If processing mode is `json-ld-1.0`, an invalid value object value error has been detected and processing is aborted.
      2. @@ -6945,7 +6947,7 @@

        Changes since Candidate Release of 12 December 2019

        This is in response to Issue 264.
      3. Updated step 13.4.7.1 of the Expansion algorithm - to expand input type before comparing to @json. + check of input type is null, which is a simpler and more correct test. This is in response to Issue 269.
      4. From 26cd3ef7c20f6bf6e359ec15bb1d3586aae27261 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 23 Dec 2019 13:34:19 -0800 Subject: [PATCH 4/6] Also update check in 13.4.16 to use same chech for _input type_. --- index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index e8cbd204..321b47be 100644 --- a/index.html +++ b/index.html @@ -2761,9 +2761,9 @@

        Algorithm

        active property, value for element, and the {{JsonLdOptions/frameExpansion}} and {{JsonLdOptions/ordered}} flags. -
      5. Unless expanded value is null, +
      6. Unless expanded value is null, and expanded property is `@value`, - and input type is `@json`, set + and input type is not null, set the expanded property entry of result to expanded value.
      7. Continue with the next key from element.
      8. @@ -6945,7 +6945,9 @@

        Changes since Candidate Release of 12 December 2019

        of the Expansion algorithm to exclude the expanded index being `@none`. This is in response to Issue 264. -
      9. Updated step 13.4.7.1 of the +
      10. Updated steps 13.4.7.1 + and 13.4.16 + of the Expansion algorithm check of input type is null, which is a simpler and more correct test. This is in response to Issue 269.
      11. From 207171d99ecb90deb4acbad1348516786325973b Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 23 Dec 2019 13:39:33 -0800 Subject: [PATCH 5/6] More explaination. --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 321b47be..89b999cc 100644 --- a/index.html +++ b/index.html @@ -2763,8 +2763,9 @@

        Algorithm

        and {{JsonLdOptions/ordered}} flags.
      12. Unless expanded value is null, and expanded property is `@value`, - and input type is not null, set - the expanded property entry of result to + and input type is not null, it was determined in step 12 + that element is a value object representing a JSON literal. + Set the expanded property entry of result to expanded value.
      13. Continue with the next key from element.
      From 272fab39a99253a493c1159a6c7ef9b02b3d7674 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 24 Dec 2019 11:04:16 -0800 Subject: [PATCH 6/6] Change to set _input type_ to the expanded value. --- index.html | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 89b999cc..ae5c133c 100644 --- a/index.html +++ b/index.html @@ -2487,10 +2487,13 @@

      Algorithm

      and `false` for propagate.
  • -
  • Initialize two empty maps, result +
  • Initialize two empty maps, result and nests. - Initialize input type to the last value of the first entry in element + Initialize input type to expansion of the last value of the first entry in element expanding to @type (if any), ordering entries lexicographically by key. + Both the key and value of the matched entry are expanded using the + IRI Expansion algorithm, + passing active context, and true for vocab.
  • For each key and value in element, @@ -2606,10 +2609,8 @@

    Algorithm

  • If expanded property is @value:
    1. If - input type is not null, - it was determined in step 12 - that element is a value object representing a JSON literal. - Set expanded value to value. + input type is @json, + set expanded value to value. If processing mode is `json-ld-1.0`, an invalid value object value error has been detected and processing is aborted.
    2. @@ -2762,10 +2763,9 @@

      Algorithm

      and the {{JsonLdOptions/frameExpansion}} and {{JsonLdOptions/ordered}} flags.
    3. Unless expanded value is null, - and expanded property is `@value`, - and input type is not null, it was determined in step 12 - that element is a value object representing a JSON literal. - Set the expanded property entry of result to + expanded property is @value, + and input type is not @json, + set the expanded property entry of result to expanded value.
    4. Continue with the next key from element.
    @@ -6946,11 +6946,10 @@

    Changes since Candidate Release of 12 December 2019

    of the Expansion algorithm to exclude the expanded index being `@none`. This is in response to Issue 264.
  • -
  • Updated steps 13.4.7.1 - and 13.4.16 +
  • Updated step 12 of the Expansion algorithm - check of input type is null, which is a simpler and more correct test. + input type to use the expanded value. This is in response to Issue 269.