diff --git a/index.html b/index.html index c19e2ca9..3f6cd997 100644 --- a/index.html +++ b/index.html @@ -8171,41 +8171,308 @@

Graph Containers

ignored for such documents.

-

Embedding JSON-LD in HTML Documents

+

Embedding JSON-LD in HTML Documents

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 type attribute set to application/ld+json.

-
-  
-  
+

Depending on how the HTML document is served, certain strings may need - to be escaped.

+ to be escaped. See + + Restrictions for contents of script elements + in [[!HTML52]] for details. In particular, the content MAY be enclosed + in the HTML comment open (<!--) and comment close (-->) text sequences

+ +

Defining how such data may be used is beyond the scope of this specification. The embedded JSON-LD document might be extracted as is or, e.g., be interpreted as RDF.

-

If JSON-LD content is extracted as RDF [[RDF11-CONCEPTS]], it should be expanded into an +

If JSON-LD content is extracted as RDF [[RDF11-CONCEPTS]], it MUST be expanded into an RDF Dataset using the Deserialize JSON-LD to RDF Algorithm - [[JSON-LD11-API]].

+ [[JSON-LD11-API]]. All script elements + with type application/ld+json MUST be processed and merged + into a single dataset with equivalent blank node identifiers contained in + separate script elements treated as if they were in a single document (i.e., + blank nodes are shared between different JSON-LD script elements).

+ + + +

Otherwise, unless a specific script is targeted + (see ), + only the first script element of type application/ld+json is used.

+ +

When processing a JSON-LD + script element, + only the resolved document location of the + containing HTML document is used to establish the default base IRI of the enclosed + JSON-LD content.

+ +

Locating a Specific JSON-LD Script Element

+

A specific + 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 "schema" can be targeted using the URL + http://example.com/document#schema.

+ + +