From 8d0b7b532e87fd7ca544fd34e85792ab7e60df60 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 17 Oct 2024 17:18:02 -0700 Subject: [PATCH 1/7] Add candidate change and insertions for #380/#388. --- index.html | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 77e59586..18faaa39 100644 --- a/index.html +++ b/index.html @@ -302,7 +302,7 @@ with documents created using [[[JSON-LD10]]] [[JSON-LD10]].

-
+

This document has been developed by the JSON-LD Working Group and was derived from the JSON-LD Community Group's Final Report.

@@ -312,6 +312,9 @@

This specification is intended to supersede the [[[JSON-LD10-API]]] [[JSON-LD10-API]] specification.

+

+ This document includes Candidate Corrections to the current + W3C Recommendation dated 16 July 2020.

Set of Documents

@@ -3068,12 +3071,23 @@

Algorithm

nested value expands to @value, an invalid @nest value error has been detected and processing is aborted. -
  • Recursively repeat steps - 3, - 8, +
  • +
    + Candidate Correction 1 +

    This algorithm step omitted two additional steps + which include nesting-key in addition to nested value. + For more information, refer to issue 380.

    +
    + Recursively repeat steps + + 3, + 8, + 13, and 14 - using nesting-key for active property, and + + using nesting-key for active property, and + nested value for element.
    Steps 3 and 8 @@ -7107,6 +7121,8 @@

    Changes since Recommendation of 16 July 2020

  • Changed obsolete use of `void` in WebIDL to `undefined`.
  • Added some clarifications to the algorithm of .
  • Added some clarifications to the algorithm of .
  • +
  • Added some clarifications to + as described in CANDIDATE CORRECTION 1.
  • Added additional language to the Compaction Algorithm step 12.8.9.6.1 to first expand From 281ead80d7b592b1516f5003f1edb084bbfea1a0 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 18 Oct 2024 12:37:53 -0700 Subject: [PATCH 2/7] Address formatting and style concerns. --- index.html | 86 +++++++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/index.html b/index.html index 18faaa39..9b8700cb 100644 --- a/index.html +++ b/index.html @@ -312,7 +312,7 @@

    This specification is intended to supersede the [[[JSON-LD10-API]]] [[JSON-LD10-API]] specification.

    -

    +

    This document includes Candidate Corrections to the current W3C Recommendation dated 16 July 2020.

    @@ -6852,7 +6852,12 @@

    JsonLdErrorCode

    relative iri compaction.

  • -

    Changes since 1.0 Recommendation of 16 January 2014

    +
    +

    Change log

    +

    Note that this change log only identifies substantive changes since [[[JSON-LD10-API]]].

    + +
    + Substantive changes since the Recommendation of 16 January 2014
    • The Expansion Algorithm has a special processing mode, based on @@ -6913,10 +6918,10 @@

      JsonLdErrorCode

      href="#expansion-algorithm">Expansion Algorithm removes this indexing transparently.
    -

    Additionally, see .

    -
    + -

    Changes since JSON-LD Community Group Final Report

    +
    +Substantive changes since the Community Group Final Report of 16 January 2014 -
    -
    -

    Changes since Candidate Release of 12 December 2019

    -

    All changes are editorial and do not affect the observable - behavior of the API nor the expected test results.

    + + +
    + Substantive changes since Candidate Recommendation of 12 December 2019
    • Add `application/xhtml+xml` as an allowed media type in , in the note in , and as a use of the {{LoadDocumentOptions/profile}} API option.
    • -
    • Added add value, IRI expanding, and IRI compacting - macros to reduce boilerplate in algorithmic language.
    • +
    • Improved algorithms in , , @@ -7028,11 +7032,10 @@

      Changes since Candidate Release of 12 December 2019

      and to allow RemoteDocument to be used as a direct input, which resolves a {{Promise}} boundary issue.
    -
    -
    -

    Changes since Candidate Release of 05 March 2020

    -

    All changes are editorial and do not affect the observable - behavior of the API nor the expected test results.

    + + +
    + Substantive changes since Candidate Recommendation of 05 March 2020
    • The inverse context is not passed explicitly as a parameter to the Term Selection, @@ -7103,46 +7106,51 @@

      Changes since Candidate Release of 05 March 2020

    • Added to describe the `preserve` keyword, which is only used for framing.
    -
    -
    -

    Changes since Proposed Recommendation Release of 7 May 2020

    + + +
    + Changes since Proposed Recommendation Release of 7 May 2020 +

    All changes are editorial and do not affect the observable + behavior of the API nor the expected test results.

      -
    • Removed remaining "at-risk" notes.
    • -
    • Update bibliographic reference for JCS to [[RFC8785]].
    • -
    • Changed `[Exposed=(Window,Worker)]` to `[Exposed=JsonLd]`, + + +
    -
    -
    -

    Changes since Recommendation of 16 July 2020

    + + +
    + Substantive changes since Recommendation of 16 July 2020
      -
    • Regenerated definition list, which does not attempt to filter out unused definitions.
    • -
    • Changed obsolete use of `void` in WebIDL to `undefined`.
    • -
    • Added some clarifications to the algorithm of .
    • -
    • Added some clarifications to the algorithm of .
    • -
    • Added some clarifications to - as described in CANDIDATE CORRECTION 1.
    • -
    • Added additional language to the + + +
    • 2021-01-05: Added some clarifications to the algorithm of .
    • +
    • 2020-02-23: Added some clarifications to + as described in Candidate Correction 1.
    • +
    • 2021-02-25: Added some clarifications to the algorithm of .
    • +
    • 2021-05-15: Added additional language to the Compaction Algorithm step 12.8.9.6.1 to first expand container key before compacting it.
    • -
    • - Changed the Create Term Definition +
    • 2023-06-28: Changed the Create Term Definition in section 4.2 of the Context Processing Algorithms, to ensure that all possible features for reverse term definitions are processed. The change was to remove and return from the end of step 13, and revise step 14 to begin with Otherwise.
    • -
    • Use code point order as a better definition for the more vague "lexicographical order".
    • -
    • Remove spurious paragraph in the description of {{JsonLdOptions/frameExpansion}}
    • -
    • Specify that the value of extractAllScripts +
    • 2023-08-06: Use code point order as a better definition for the more vague "lexicographical order".
    • + +
    • 2024-07-10: Specify that the value of extractAllScripts in toRdf() defaults to `true`, rather than `false`. This is consistent with wording in Embedding JSON-LD in HTML Documents [[JSON-LD11]] for treating script elements as a single document.
    +
    +
    Date: Sat, 19 Oct 2024 10:01:34 -0700 Subject: [PATCH 3/7] Reorder change details with newest first. Renumber this change to CANDIDATE CORRECTION 2, as it is ordinally the second change noted in the Changes since Rec detail. --- index.html | 418 ++++++++++++++++++++++++++--------------------------- 1 file changed, 209 insertions(+), 209 deletions(-) diff --git a/index.html b/index.html index 9b8700cb..c0f416cb 100644 --- a/index.html +++ b/index.html @@ -313,7 +313,7 @@

    This specification is intended to supersede the [[[JSON-LD10-API]]] [[JSON-LD10-API]] specification.

    - This document includes Candidate Corrections to the current + This document includes Candidate Corrections to the current W3C Recommendation dated 16 July 2020.

    @@ -3072,20 +3072,20 @@

    Algorithm

    invalid @nest value error has been detected and processing is aborted.
  • -
    - Candidate Correction 1 +
    + Candidate Correction 2

    This algorithm step omitted two additional steps which include nesting-key in addition to nested value. For more information, refer to issue 380.

    Recursively repeat steps - + 3, 8, 13, and 14 - + using nesting-key for active property, and nested value for element. @@ -6856,181 +6856,45 @@

    JsonLdErrorCode

    Change log

    Note that this change log only identifies substantive changes since [[[JSON-LD10-API]]].

    -
    - Substantive changes since the Recommendation of 16 January 2014 - -
    - -
    -Substantive changes since the Community Group Final Report of 16 January 2014 +
    + Substantive changes since Recommendation of 16 July 2020
      -
    • Lists may now have items which are themselves lists.
    • -
    • The Deserialize JSON-LD to RDF Algorithm - has been updated to ensure that only well-formed triples - are emitted; previously, it only ensured that triples containing - relative IRI references were excluded.
    • -
    • The API now adds an {{JsonLdOptions/ordered}} - option, defaulting to false This is used in algorithms to - control iteration of map entry keys. Previously, the - algorithms always required such an order. The instructions for - evaluating test results have been updated accordingly.
    • -
    • The Generate Blank Node Identifier algorithm - has been updated to remove the specifics of how new blank node - identifiers are created.
    • -
    • Values of @type, or an alias of @type, may now have their @container set to @set - to ensure that @type entries are always represented as an array. This - also allows a term to be defined for @type, where the value MUST be a map - with @container set to @set.
    • -
    • Updated the IRI Expansion algorithm so that - if value contains a colon (:), but - prefix is not a term, to only return value - if it has the form of an IRI, otherwise fall through to - the rest of the algorithm.
    • -
    • The use of blank node identifiers to label properties is obsolete, - and may be removed in a future version of JSON-LD, - as is the support for generalized RDF Datasets - and thus the {{JsonLdOptions/produceGeneralizedRdf}} option may be also be removed.
    • -
    • Added API steps to accept text/html as input, - extracting either a specifically targeted script element, - the first found JSON-LD script element, - or all JSON-LD script elements.
    • -
    • Added {{RemoteDocument/contentType}} field to RemoteDocument.
    • -
    • Added support for protected contexts and term definitions.
    • -
    • Because scoped contexts can lead to contexts being reloaded, replace the - recursive context inclusion error with a context overflow error.
    • -
    • Added support for "@type": "@none" in a term definition to prevent value compaction.
    • -
    • Added support for JSON literals.
    • -
    • Term definitions with keys which are of the form of an IRI or a compact IRI MUST NOT - expand to an IRI other than the expansion of the key itself.
    • -
    • Consolidate RemoteDocument processing into the LoadDocumentCallback - including variations on HTML processing.
    • -
    • The IRI Compaction algorithm may generate an error if the result is an - IRI which could be confused with a compact IRI in the - active context.
    • -
    • By default, all contexts are propagated when traversing node objects, other than - type-scoped contexts. This can be controlled using the @propagate - entry in a local context.
    • -
    • A context may contain a @import entry used to reference a remote context - within a context, allowing JSON-LD 1.1 features to be added to contexts originally - authored for JSON-LD 1.0.
    • -
    • The colliding keywords error is not issued for `@type`; - instead, previous values of `@type` are prepended to any new values, when expanding.
    • -
    • A node object may include an included block, - which is used to contain a set of node objects which are treated - exactly as if they were node objects defined in an array including the containing - node object. - This allows the use of the object form of a JSON-LD document when there is more - than one node object being defined, and where those node objects - are not embedded as values of the containing node object.
    • -
    • A relative IRI reference has been added as a possible value for @vocab in - a context. When this is set, vocabulary-relative IRI references, such as the - entries of node objects, are expanded or compacted relative - to the base IRI and the vocabulary mapping using string concatenation.
    • -
    • In the LoadDocumentCallback, if the retrieved content is not any JSON media type - and there is a link header with `rel=alternate` and `type=application/ld+json`, redirect - to that content.
    • -
    • Value objects, and associated context and term definitions have been updated to - support `@direction` for setting the base direction of strings.
    • -
    • It is no longer required that language tags be normalized to lower case, - other than for testing considerations. - Language tags that are not valid according to [[BCP47]] are rejected.
    • -
    • The processing mode is now implicitly `json-ld-1.1`, unless set - explicitly to `json-ld-1.0`.
    • -
    • Improve notation using IRI, IRI reference, and relative IRI reference.
    • -
    • Ignore terms and IRIs that have the form of a keyword (`"@"1*ALPHA`).
    • + + +
    • 2021-01-05: Added some clarifications to the algorithm of .
    • +
    • 2020-02-23: Added some clarifications to + as described in Candidate Correction 2.
    • +
    • 2021-02-25: Added some clarifications to the algorithm of .
    • +
    • 2021-05-15: Added additional language to the + Compaction Algorithm + step 12.8.9.6.1 to first expand + container key before compacting it.
    • +
    • 2023-06-28: Changed the Create Term Definition + in section 4.2 of the Context Processing Algorithms, to ensure that all + possible features for reverse term definitions are processed. The change + was to remove and return from the end of step 13, and revise step + 14 to begin with Otherwise.
    • +
    • 2023-08-06: Use code point order as a better definition for the more vague "lexicographical order".
    • + +
    • 2024-07-10: Specify that the value of extractAllScripts + in toRdf() + defaults to `true`, rather than `false`. + This is consistent with wording in + Embedding JSON-LD in HTML Documents [[JSON-LD11]] + for treating script elements as a single document.
    -
    - Substantive changes since Candidate Recommendation of 12 December 2019 +
    + Changes since Proposed Recommendation Release of 7 May 2020 +

    All changes are editorial and do not affect the observable + behavior of the API nor the expected test results.

      -
    • Add `application/xhtml+xml` as an allowed media type in , - in the note in , - and as a use of the {{LoadDocumentOptions/profile}} API option.
    • - -
    • Improved algorithms in - , - , - , - , - , - , - and . -
    • -
    • When creating an `i18n` datatype or `rdf:CompoundLiteral`, language tags are - normalized to lower case to improve interoperability between implementations.
    • -
    • Moved non-recursive portions algorithms - into the {{JsonLdProcessor}} processing steps.
    • -
    • Fix some {{JsonLdOption}} initializers where defaults are `null`. - Set default value for processingMode to `json-ld-1.1`.
    • -
    • Remove normative text for canonicalizing `rdf:JSON` literals and - reference the `rdf:JSON` datatype of the syntax document - for the conversion of the JSON Literals in .
    • -
    • Updated interfaces in - to use record, - instead of dictionary, - and to allow RemoteDocument to be used - as a direct input, which resolves a {{Promise}} boundary issue.
    • + + +
    @@ -7108,47 +6972,183 @@

    Change log

    -
    - Changes since Proposed Recommendation Release of 7 May 2020 -

    All changes are editorial and do not affect the observable - behavior of the API nor the expected test results.

    +
    + Substantive changes since Candidate Recommendation of 12 December 2019
      - - - +
    • Add `application/xhtml+xml` as an allowed media type in , + in the note in , + and as a use of the {{LoadDocumentOptions/profile}} API option.
    • + +
    • Improved algorithms in + , + , + , + , + , + , + and . +
    • +
    • When creating an `i18n` datatype or `rdf:CompoundLiteral`, language tags are + normalized to lower case to improve interoperability between implementations.
    • +
    • Moved non-recursive portions algorithms + into the {{JsonLdProcessor}} processing steps.
    • +
    • Fix some {{JsonLdOption}} initializers where defaults are `null`. + Set default value for processingMode to `json-ld-1.1`.
    • +
    • Remove normative text for canonicalizing `rdf:JSON` literals and + reference the `rdf:JSON` datatype of the syntax document + for the conversion of the JSON Literals in .
    • +
    • Updated interfaces in + to use record, + instead of dictionary, + and to allow RemoteDocument to be used + as a direct input, which resolves a {{Promise}} boundary issue.
    -
    - Substantive changes since Recommendation of 16 July 2020 +
    + Substantive changes since the Community Group Final Report of 07 June 2018
      - - -
    • 2021-01-05: Added some clarifications to the algorithm of .
    • -
    • 2020-02-23: Added some clarifications to - as described in Candidate Correction 1.
    • -
    • 2021-02-25: Added some clarifications to the algorithm of .
    • -
    • 2021-05-15: Added additional language to the - Compaction Algorithm - step 12.8.9.6.1 to first expand - container key before compacting it.
    • -
    • 2023-06-28: Changed the Create Term Definition - in section 4.2 of the Context Processing Algorithms, to ensure that all - possible features for reverse term definitions are processed. The change - was to remove and return from the end of step 13, and revise step - 14 to begin with Otherwise.
    • -
    • 2023-08-06: Use code point order as a better definition for the more vague "lexicographical order".
    • - -
    • 2024-07-10: Specify that the value of extractAllScripts - in toRdf() - defaults to `true`, rather than `false`. - This is consistent with wording in - Embedding JSON-LD in HTML Documents [[JSON-LD11]] - for treating script elements as a single document.
    • +
    • Lists may now have items which are themselves lists.
    • +
    • The Deserialize JSON-LD to RDF Algorithm + has been updated to ensure that only well-formed triples + are emitted; previously, it only ensured that triples containing + relative IRI references were excluded.
    • +
    • The API now adds an {{JsonLdOptions/ordered}} + option, defaulting to false This is used in algorithms to + control iteration of map entry keys. Previously, the + algorithms always required such an order. The instructions for + evaluating test results have been updated accordingly.
    • +
    • The Generate Blank Node Identifier algorithm + has been updated to remove the specifics of how new blank node + identifiers are created.
    • +
    • Values of @type, or an alias of @type, may now have their @container set to @set + to ensure that @type entries are always represented as an array. This + also allows a term to be defined for @type, where the value MUST be a map + with @container set to @set.
    • +
    • Updated the IRI Expansion algorithm so that + if value contains a colon (:), but + prefix is not a term, to only return value + if it has the form of an IRI, otherwise fall through to + the rest of the algorithm.
    • +
    • The use of blank node identifiers to label properties is obsolete, + and may be removed in a future version of JSON-LD, + as is the support for generalized RDF Datasets + and thus the {{JsonLdOptions/produceGeneralizedRdf}} option may be also be removed.
    • +
    • Added API steps to accept text/html as input, + extracting either a specifically targeted script element, + the first found JSON-LD script element, + or all JSON-LD script elements.
    • +
    • Added {{RemoteDocument/contentType}} field to RemoteDocument.
    • +
    • Added support for protected contexts and term definitions.
    • +
    • Because scoped contexts can lead to contexts being reloaded, replace the + recursive context inclusion error with a context overflow error.
    • +
    • Added support for "@type": "@none" in a term definition to prevent value compaction.
    • +
    • Added support for JSON literals.
    • +
    • Term definitions with keys which are of the form of an IRI or a compact IRI MUST NOT + expand to an IRI other than the expansion of the key itself.
    • +
    • Consolidate RemoteDocument processing into the LoadDocumentCallback + including variations on HTML processing.
    • +
    • The IRI Compaction algorithm may generate an error if the result is an + IRI which could be confused with a compact IRI in the + active context.
    • +
    • By default, all contexts are propagated when traversing node objects, other than + type-scoped contexts. This can be controlled using the @propagate + entry in a local context.
    • +
    • A context may contain a @import entry used to reference a remote context + within a context, allowing JSON-LD 1.1 features to be added to contexts originally + authored for JSON-LD 1.0.
    • +
    • The colliding keywords error is not issued for `@type`; + instead, previous values of `@type` are prepended to any new values, when expanding.
    • +
    • A node object may include an included block, + which is used to contain a set of node objects which are treated + exactly as if they were node objects defined in an array including the containing + node object. + This allows the use of the object form of a JSON-LD document when there is more + than one node object being defined, and where those node objects + are not embedded as values of the containing node object.
    • +
    • A relative IRI reference has been added as a possible value for @vocab in + a context. When this is set, vocabulary-relative IRI references, such as the + entries of node objects, are expanded or compacted relative + to the base IRI and the vocabulary mapping using string concatenation.
    • +
    • In the LoadDocumentCallback, if the retrieved content is not any JSON media type + and there is a link header with `rel=alternate` and `type=application/ld+json`, redirect + to that content.
    • +
    • Value objects, and associated context and term definitions have been updated to + support `@direction` for setting the base direction of strings.
    • +
    • It is no longer required that language tags be normalized to lower case, + other than for testing considerations. + Language tags that are not valid according to [[BCP47]] are rejected.
    • +
    • The processing mode is now implicitly `json-ld-1.1`, unless set + explicitly to `json-ld-1.0`.
    • +
    • Improve notation using IRI, IRI reference, and relative IRI reference.
    • +
    • Ignore terms and IRIs that have the form of a keyword (`"@"1*ALPHA`).
    + +
    + Substantive changes since the Recommendation of 16 January 2014 + +
  • Date: Sat, 19 Oct 2024 11:59:55 -0700 Subject: [PATCH 4/7] Comment out 2021-01-05 editorial changes to node-map-generation algorithm. Re-number the change for the expansion algorithm to candidate correction 1. Comment out 2021-02-25 editorial changes to IRI expansion algorithm. --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index c0f416cb..d74f4d39 100644 --- a/index.html +++ b/index.html @@ -3072,20 +3072,20 @@

    Algorithm

    invalid @nest value error has been detected and processing is aborted.
  • -
    - Candidate Correction 2 +
    + Candidate Correction 1

    This algorithm step omitted two additional steps which include nesting-key in addition to nested value. For more information, refer to issue 380.

    Recursively repeat steps - + 3, 8, 13, and 14 - + using nesting-key for active property, and nested value for element. @@ -6861,10 +6861,10 @@

    Change log

      -
    • 2021-01-05: Added some clarifications to the algorithm of .
    • +
    • 2020-02-23: Added some clarifications to - as described in Candidate Correction 2.
    • -
    • 2021-02-25: Added some clarifications to the algorithm of .
    • + as described in Candidate Correction 1. +
    • 2021-05-15: Added additional language to the Compaction Algorithm step 12.8.9.6.1 to first expand From 5f985ff9833db0ef12df8adfb3dd0c4c74e20b80 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 19 Oct 2024 12:15:25 -0700 Subject: [PATCH 5/7] Add Candidate Correction 2 for issue #514. --- index.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index d74f4d39..57418d0d 100644 --- a/index.html +++ b/index.html @@ -3876,9 +3876,15 @@

      Algorithm

      set map key to the value of @index in expanded item, if any.
    • Otherwise, if container includes @index and index key is not @index: +
      + Candidate Correction 2 +

      The value of `@index` on a property map can be a Compact IRI in addition to an IRI. + The Compaction Algorithm is updated to first expand this value before re-compacting it. + For more information, refer to issue 380.

      +
      1. Reinitialize container key by IRI compacting - index key after first IRI expanding it.
      2. + index key after first IRI expanding it.
      3. Set map key to the first value of container key in compacted item, if any.
      4. If there are remaining values in compacted item for container key, use add value to @@ -6868,7 +6874,8 @@

        Change log

      5. 2021-05-15: Added additional language to the Compaction Algorithm step 12.8.9.6.1 to first expand - container key before compacting it.
      6. + container key before compacting it, + as described in Candidate Correction 2.
      7. 2023-06-28: Changed the Create Term Definition in section 4.2 of the Context Processing Algorithms, to ensure that all possible features for reverse term definitions are processed. The change From 0d4608053e59284d5adfb2a1fb3c36e0455c1bdd Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 20 Oct 2024 12:45:29 -0700 Subject: [PATCH 6/7] CANDIDATE CORRECTION 3 for issue 565, PR 566 to "Fix context processing for reverse terms". --- index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 57418d0d..746191ce 100644 --- a/index.html +++ b/index.html @@ -1634,6 +1634,11 @@

        Algorithm

    • If value contains the entry @reverse: +
      + Candidate Correction 3 +

      This changes the algorithm for processing a reverse term so that it doesn't return early. + For more information, refer to issue 565.

      +
      1. If value contains @id or @nest, entries, an invalid reverse property @@ -1667,10 +1672,10 @@

        Algorithm

      2. Set the term definition of term in active context to definition and the value associated with defined's entry term to - true.
      3. + true and return.
    • -
    • Otherwise, if value contains the entry @id and its value +
    • Otherwise, if value contains the entry @id and its value does not equal term:
      1. If the @id entry of value @@ -6880,7 +6885,8 @@

        Change log

        in section 4.2 of the Context Processing Algorithms, to ensure that all possible features for reverse term definitions are processed. The change was to remove and return from the end of step 13, and revise step - 14 to begin with Otherwise.
      2. + 14 to begin with Otherwise, + as described in Candidate Correction 3.
      3. 2023-08-06: Use code point order as a better definition for the more vague "lexicographical order".
      4. 2024-07-10: Specify that the value of extractAllScripts From 5a2e5a135835137f139a09533746cda2a3fa7a10 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 20 Oct 2024 13:25:07 -0700 Subject: [PATCH 7/7] CANDIDATE CORRECTION 4 for `extractAllScripts` option to `toRdf()`. --- index.html | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 746191ce..f860ab89 100644 --- a/index.html +++ b/index.html @@ -309,7 +309,7 @@

        There is a live JSON-LD playground that is capable of demonstrating the features described in this document.

        - +

        This specification is intended to supersede the [[[JSON-LD10-API]]] [[JSON-LD10-API]] specification.

        @@ -1626,7 +1626,7 @@

        Algorithm

      5. Otherwise, if the expanded type is neither @id, nor @json, nor @none, - nor @vocab, + nor @vocab, nor an IRI, an invalid type mapping error has been detected and processing is aborted.
      6. @@ -1638,7 +1638,7 @@

        Algorithm

        Candidate Correction 3

        This changes the algorithm for processing a reverse term so that it doesn't return early. For more information, refer to issue 565.

        -
    +
    1. If value contains @id or @nest, entries, an invalid reverse property @@ -1672,10 +1672,10 @@

      Algorithm

    2. Set the term definition of term in active context to definition and the value associated with defined's entry term to - true and return.
    3. + true and return.
  • -
  • Otherwise, if value contains the entry @id and its value +
  • Otherwise, ifIf value contains the entry @id and its value does not equal term:
    1. If the @id entry of value @@ -1902,7 +1902,7 @@

      Algorithm

    2. If value contains any entry other than @id, @reverse, @container, - @context, + @context, @direction, @index, @language, @@ -2969,7 +2969,7 @@

      Algorithm

      IRI expanding index key.
    3. Initialize index property values to an array consisting of re-expanded index followed - by the existing values of + by the existing values of the concatenation of expanded index key in item, if any.
    4. Add the key-value pair (expanded index key-index property values) @@ -3089,9 +3089,9 @@

      Algorithm

      8, 13, - and 14 - - using nesting-key for active property, and + and 14 using + + nesting-key for active property, and nested value for element.
      Steps 3 @@ -3829,7 +3829,7 @@

      Algorithm

    5. Use add value to add compacted item to the item active property entry in nest result using as array.
    6. -
    +
  • Otherwise, container does not include @graph or otherwise does not match one of the previous cases. @@ -3889,7 +3889,7 @@

    Algorithm

    1. Reinitialize container key by IRI compacting - index key after first IRI expanding it.
    2. + index key after first IRI expanding it.
    3. Set map key to the first value of container key in compacted item, if any.
    4. If there are remaining values in compacted item for container key, use add value to @@ -5862,7 +5862,7 @@

      Algorithm

      from remote document, if available; otherwise to the {{JsonLdOptions/base}} option from options. If set, the {{JsonLdOptions/base}} option from options overrides the base IRI.
    5. -
    6. If the {{JsonLdOptions/expandContext}} option in options is set, +
    7. If the {{JsonLdOptions/expandContext}} option in options is set, update the active context using the Context Processing algorithm, passing the {{JsonLdOptions/expandContext}} as local context and the original base URL from active context as base URL. @@ -6026,6 +6026,13 @@

      Algorithm

      Transforms the given input into an RdfDataset according to the steps in the Deserialize JSON-LD to RDF Algorithm:

      +
      + Candidate Correction 4 +

      This changes the default for extractAllScripts to be `false`, + which is consistent with the wording in Embedding JSON-LD in HTML Documents in [[JSON-LD11]]. + For more information, refer to issue 603.

      +
      +
      1. Create a new {{Promise}} promise and return it. The following steps are then deferred.
      2. @@ -6033,8 +6040,8 @@

        Algorithm

        expand() method using input and options - with {{JsonLdOptions/ordered}} set to false, - and {{JsonLdOptions/extractAllScripts}} defaulting to true. + with {{JsonLdOptions/ordered}} set to false, + and {{JsonLdOptions/extractAllScripts}} defaulting to true.
      3. Create a new RdfDataset dataset.
      4. Create a new map node map.
      5. Invoke the Node Map Generation algorithm, @@ -6569,7 +6576,7 @@

        RemoteDocument

        1. If the extractAllScripts option is not present, or false, the promise is rejected with a JsonLdError whose {{JsonLdError/code}} is set to loading document failed - and processing is terminated.
        2. + and processing is terminated.
        3. Otherwise, the extractAllScripts option is true. Set document to a new empty array. For each JSON-LD script element in input: @@ -6887,14 +6894,15 @@

          Change log

          was to remove and return from the end of step 13, and revise step 14 to begin with Otherwise, as described in Candidate Correction 3.
        4. -
        5. 2023-08-06: Use code point order as a better definition for the more vague "lexicographical order".
        6. +
        7. 2024-07-10: Specify that the value of extractAllScripts in toRdf() defaults to `true`, rather than `false`. This is consistent with wording in Embedding JSON-LD in HTML Documents [[JSON-LD11]] - for treating script elements as a single document.
        8. + for treating script elements as a single document, + as described in Candidate Correction 4. @@ -7087,7 +7095,7 @@

          Change log

        9. In the LoadDocumentCallback, if the retrieved content is not any JSON media type and there is a link header with `rel=alternate` and `type=application/ld+json`, redirect to that content.
        10. -
        11. Value objects, and associated context and term definitions have been updated to +
        12. Value objects, and associated context and term definitions have been updated to support `@direction` for setting the base direction of strings.
        13. It is no longer required that language tags be normalized to lower case, other than for testing considerations.