From 08c93a129c8fa2996c1e7be01d569356e8021b1e Mon Sep 17 00:00:00 2001
From: Benjamin Young HTML script elements can be used to embed blocks of data in documents.
- This way, JSON-LD content can be easily embedded in HTML [[HTML52]] by placing
- it in a script element with the
+ JSON-LD content can be easily embedded in HTML [[HTML52]] by placing
+ it in a Script element with the Otherwise, unless a specific script is targeted
- (see ),
- only the first script element of When processing a JSON-LD
script element,
the Document Base URL
From 169deb3dc543689adc0cb91ee6058f24018cce1c Mon Sep 17 00:00:00 2001
From: Benjamin Young Graph Containers
data-result-for="Embedding JSON-LD in HTML with comments-original">
@@ -8907,9 +8884,8 @@ Graph Containers
data-to-rdf>
- Subject Property Value Value Type
- http://dbpedia.org/resource/John_Lennon foaf:name John Lennon
- http://dbpedia.org/resource/John_Lennon schema:birthDate 1940-10-09 xsd:date
+ http://dbpedia.org/resource/John_Lennon schema:spouse http://dbpedia.org/resource/Cynthia_Lennon
+ _:b0 schema:name Encoding Issues _:b0 schema:description Issues list such as unescaped </script> or --> Graph Containers
data-result-for="Embedding JSON-LD in HTML with comments-expanded"
data-to-rdf>
From db4998a79c40ddc18ec159155e672b660091211a Mon Sep 17 00:00:00 2001
From: Benjamin Young Graph Containers
Embedding JSON-LD in HTML Documents
- type
attribute set to
- application/ld+json
.type
attribute set to
+ application/ld+json
. Doing so creates a
+ data block.type
application/ld+json
is used.Graph Containers
script element
within an HTML document may be located using
a fragment identifier matching the unique identifier
- of the script element within the HTML document located by a URL (see [[!DOM]]).
For example, given an HTML document located at http://example.com/document
,
a script element identified by "name" can be targeted using the URL
http://example.com/document#name
.
When processing a JSON-LD - script element, - the Document Base URL - of the containing HTML document, - as defined in [[HTML52]], - is used to establish the default base IRI of the enclosed - JSON-LD content.
- -- The use of the Document Base URL - from [[HTML52]] for setting the base IRI of the enclosed JSON-LD - is an experimental feature, which may be changed in a future version of this specification. -
+base
elementWhen processing a JSON-LD + script element, + the Document Base URL + of the containing HTML document, + as defined in [[HTML52]], + is used to establish the default base IRI of the enclosed + JSON-LD content.
+ ++ The use of the Document Base URL + from [[HTML52]] for setting the base IRI of the enclosed JSON-LD + is an experimental feature, which may be changed in a future version of this specification. +
- +HTML allows for Dynamic changes to base URLs. - This specification does not require any specific behavior, - and to ensure that all systems process the base IRI equivalently, authors SHOULD - either use absolute IRIs, or explicitly as defined in . - Implementations (particularly those natively operating in the [[!DOM]]) MAY take into consideration - Dynamic changes to base URLs.
+HTML allows for Dynamic changes to base URLs. + This specification does not require any specific behavior, + and to ensure that all systems process the base IRI equivalently, authors SHOULD + either use absolute IRIs, or explicitly as defined in . + Implementations (particularly those natively operating in the [[!DOM]]) MAY take into consideration + Dynamic changes to base URLs.
+script
elementsThis section adds additional requirements for escaping
From 7716b18b5e7300dd4683ef6224a0884ca2c2a742 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg Graph Containers