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.
-
-
-
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
-
- - The Expansion Algorithm
- has a special processing mode, based on
- the {{JsonLdOptions/frameExpansion}} flag, to enable content associated with JSON-LD
- frames, which may not otherwise be valid JSON-LD documents.
- - An expanded term definition can now have an
-
@context
entry, which defines a context used for values of
- a property identified with such a term. This context is used
- in both the Expansion Algorithm and
- Compaction Algorithm.
- - A new is required
- for framing, to create a single graph from the default
- and named graphs.
- - An expanded term definition can now have an
-
@nest
entry, which identifies a term expanding to
- @nest
which is used for containing properties using the same
- @nest
mapping. When expanding, the values of an entry
- expanding to @nest
are treated as if they were contained
- within the enclosing node object directly.
- @container
values within an expanded term definition may now
- include @id
and @type
, corresponding to id maps and type maps.
- - Both language maps and index maps may legitimately have an
@none
value, but
- JSON-LD 1.0 only allowed string values. This has been updated
- to allow (and ignore) @none
values.
- - The JSON syntax has been abstracted into an internal representation
- to allow for other serialization formats that are functionally equivalent
- to JSON.
- - Preserved values are compacted using the properties of the referencing term.
- - The value for
@container
in an expanded term definition
- can also be an array containing any appropriate container
- keyword along with @set
(other than @list
).
- This allows a way to ensure that such entry values will always
- be expressed in array form.
- - Added support for the compactToRelative option to allow IRI compaction ()
- to document-relative IRIs to be disabled.
- - In JSON-LD 1.1, terms will be used as compact IRI prefixes
- when compacting only if
- a simple term definition is used where the value ends with a URI gen-delim character,
- or if their expanded term definition contains
- an
@prefix
entry with the value true
. The 1.0 algorithm has
- been updated to only consider terms that map to a value that ends with a URI
- gen-delim character.
- - Term definitions now allow
@container
to include @graph
,
- along with @id
, @index
and @set
.
- In the Expansion Algorithm, this is
- used to create a named graph from either a node object, or
- objects which are values of entries in an id map or index map.
- The Compaction Algorithm allows
- specific forms of graph objects to be compacted back to a set of node objects,
- or maps of node objects.
- - Value Expansion will not turn native values
- into node objects.
- - The Term Selection algorithm has been
- updated to allow uses of containers for values which would otherwise not
- match. This is used in the Compaction
- Algorithm to use the
@none
keyword, or an alias, for
- values of maps for which there is no natural index. The Expansion Algorithm removes this indexing
- transparently.
-
-
-
-
-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
+
+ - The Expansion Algorithm
+ has a special processing mode, based on
+ the {{JsonLdOptions/frameExpansion}} flag, to enable content associated with JSON-LD
+ frames, which may not otherwise be valid JSON-LD documents.
+ - An expanded term definition can now have an
+
@context
entry, which defines a context used for values of
+ a property identified with such a term. This context is used
+ in both the Expansion Algorithm and
+ Compaction Algorithm.
+ - A new is required
+ for framing, to create a single graph from the default
+ and named graphs.
+ - An expanded term definition can now have an
+
@nest
entry, which identifies a term expanding to
+ @nest
which is used for containing properties using the same
+ @nest
mapping. When expanding, the values of an entry
+ expanding to @nest
are treated as if they were contained
+ within the enclosing node object directly.
+ @container
values within an expanded term definition may now
+ include @id
and @type
, corresponding to id maps and type maps.
+ - Both language maps and index maps may legitimately have an
@none
value, but
+ JSON-LD 1.0 only allowed string values. This has been updated
+ to allow (and ignore) @none
values.
+ - The JSON syntax has been abstracted into an internal representation
+ to allow for other serialization formats that are functionally equivalent
+ to JSON.
+ - Preserved values are compacted using the properties of the referencing term.
+ - The value for
@container
in an expanded term definition
+ can also be an array containing any appropriate container
+ keyword along with @set
(other than @list
).
+ This allows a way to ensure that such entry values will always
+ be expressed in array form.
+ - Added support for the compactToRelative option to allow IRI compaction ()
+ to document-relative IRIs to be disabled.
+ - In JSON-LD 1.1, terms will be used as compact IRI prefixes
+ when compacting only if
+ a simple term definition is used where the value ends with a URI gen-delim character,
+ or if their expanded term definition contains
+ an
@prefix
entry with the value true
. The 1.0 algorithm has
+ been updated to only consider terms that map to a value that ends with a URI
+ gen-delim character.
+ - Term definitions now allow
@container
to include @graph
,
+ along with @id
, @index
and @set
.
+ In the Expansion Algorithm, this is
+ used to create a named graph from either a node object, or
+ objects which are values of entries in an id map or index map.
+ The Compaction Algorithm allows
+ specific forms of graph objects to be compacted back to a set of node objects,
+ or maps of node objects.
+ - Value Expansion will not turn native values
+ into node objects.
+ - The Term Selection algorithm has been
+ updated to allow uses of containers for values which would otherwise not
+ match. This is used in the Compaction
+ Algorithm to use the
@none
keyword, or an alias, for
+ values of maps for which there is no natural index. The Expansion Algorithm removes this indexing
+ transparently.
+
+
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.
+
- Reinitialize container key by IRI compacting
- index key after first IRI expanding it.
+ index key after first IRI expanding it.
- Set map key to the first value of container key in compacted item, if any.
- If there are remaining values in compacted item
for container key, use add value to
@@ -6868,7 +6874,8 @@
Change log
- 2021-05-15: Added additional language to the
Compaction Algorithm
step 12.8.9.6.1 to first expand
- container key before compacting it.
+ container key before compacting it,
+ as described in Candidate Correction 2.
- 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.
+
- If value contains
@id
or @nest
, entries, an
invalid reverse property
@@ -1667,10 +1672,10 @@ Algorithm
- Set the term definition of term in
active context to definition and the
value associated with defined's entry term to
-
true
.
+ 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:
- 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
.
+ 14 to begin with Otherwise
,
+ as described in Candidate Correction 3.
- 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
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
- 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.
@@ -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.
-
+
- If value contains
@id
or @nest
, entries, an
invalid reverse property
@@ -1672,10 +1672,10 @@ Algorithm
- Set the term definition of term in
active context to definition and the
value associated with defined's entry term to
-
true
and return.
+ 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:
- If the
@id
entry of value
@@ -1902,7 +1902,7 @@ Algorithm
- If value contains any entry other than
@id
,
@reverse
, @container
,
- @context
,
+ @context
,
@direction
,
@index
,
@language
,
@@ -2969,7 +2969,7 @@ Algorithm
IRI expanding index key.
- 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.
- 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
- Use add value to add compacted item
to the item active property entry in nest result
using as array.
-
+
- Otherwise, container does not include
@graph
or otherwise does not match one of the previous cases.
@@ -3889,7 +3889,7 @@ Algorithm
- Reinitialize container key by IRI compacting
- index key after first IRI expanding it.
+ index key after first IRI expanding it.
- Set map key to the first value of container key in compacted item, if any.
- 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.
- - If the {{JsonLdOptions/expandContext}} option in options is set,
+
- 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:
+
+
- Create a new {{Promise}} promise and return it.
The following steps are then deferred.
@@ -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
.
Create a new RdfDataset dataset.
Create a new map node map.
Invoke the Node Map Generation algorithm,
@@ -6569,7 +6576,7 @@ RemoteDocument
- 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.
+ and processing is terminated.
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.
-
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.
+ for treating script elements as a single document,
+ as described in
Candidate Correction 4.
@@ -7087,7 +7095,7 @@
Change log
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
+ 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.