diff --git a/Gemfile.lock b/Gemfile.lock index c9f8772d..19b35316 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/ruby-rdf/json-ld.git - revision: 3ad421e9e0328be7225809012f0091c269e84b5c + revision: 74a05a9f623c5a9e02cbe42f053f9d09181fee97 branch: develop specs: json-ld (3.0.2) @@ -75,14 +75,14 @@ GEM multi_json (1.13.1) net-http-persistent (3.0.0) connection_pool (~> 2.2) - nokogiri (1.10.2) + nokogiri (1.10.3) mini_portile2 (~> 2.4.0) nokogumbo (1.5.0) nokogiri public_suffix (3.0.3) rack (2.0.7) rake (12.3.2) - rdf (3.0.11) + rdf (3.0.12) hamster (~> 3.0) link_header (~> 0.0, >= 0.0.8) rdf-aggregate-repo (2.2.1) @@ -96,8 +96,10 @@ GEM nokogiri (~> 1.8) rdf (>= 2.2.8, < 4.0) rdf-xsd (>= 2.2, < 4.0) - rdf-n3 (3.0.1) + rdf-n3 (3.1.0) rdf (~> 3.0) + sparql (~> 3.0) + sxp (~> 1.0) rdf-normalize (0.3.3) rdf (>= 2.2, < 4.0) rdf-rdfa (3.0.1) @@ -128,7 +130,7 @@ GEM rdf-turtle (~> 3.0, >= 3.0.3) rdf-trix (2.2.1) rdf (>= 2.2, < 4.0) - rdf-turtle (3.0.5) + rdf-turtle (3.0.6) ebnf (~> 1.1) rdf (~> 3.0) rdf-vocab (3.0.5) diff --git a/index.html b/index.html index 59d366a7..ea42471e 100644 --- a/index.html +++ b/index.html @@ -301,8 +301,7 @@
- JSON-LD is designed to be usable directly as JSON, with no knowledge of RDF +
JSON-LD is designed to be usable directly as JSON, with no knowledge of RDF [[RDF11-CONCEPTS]]. It is also designed to be usable as RDF, if desired, for use with other Linked Data technologies like SPARQL [[SPARQL11-OVERVIEW]]. Developers who require any of the facilities listed above or need to serialize an RDF Graph @@ -312,8 +311,7 @@
- The syntax is designed to not disturb already +
The syntax is designed to not disturb already deployed systems running on JSON, but provide a smooth upgrade path from JSON to JSON-LD. Since the shape of such data varies wildly, JSON-LD features mechanisms to reshape documents into a deterministic structure @@ -436,7 +434,7 @@
These are used within this document as part of a compact IRI
as a shorthand for the resulting absolute IRI, such as dcterms:title
used to represent http://purl.org/dc/terms/title
.
JSON-LD mostly uses the JSON syntax [[RFC8259]] along with + various micro-syntaxes based on XML Schema datatypes [[XMLSCHEMA11-2]]. + However, it has become increasingly common to include JSON within + a script element + within an HTML document [[HTML]], + as described in . + As not all processors operate in an environment which can include HTML, + this specification describes various categories of JSON-LD processors.
+ +A pure JSON Processor only requires the use of a
+ JSON processor and is restricted to processing documents retrieved
+ with a JSON content type (e.g., application/ld+json
or other JSON type).
A full Processor is capable of processing JSON-LD embedded in HTML, + in addition to the capabilities of a pure JSON Processor.
+ +In addition to the normatively defined processor levels, an additional processor + level is defined for reference.
+ +A event-based JSON Processor processes a stream of characters + expecting an event after each syntactic element is encountered. + Such processors are sensitive to the order of the members of JSON objects, + which can have a performance impact if the members of JSON objects are encountered in an unexpected order. + An event-based JSON Processor may process JSON-LD embedded in HTML.
+ +An event-based JSON Processor
+ may be sensitive to processing certain keywords in order, including
+ @context
, @id
, and @type
.
@context
key, such as
documentation about the terms declared in the
document. Information contained outside of the @context
value
- is ignored when the document is used as an external JSON-LD context document.
+ is ignored when the document is used as an external JSON-LD context document.
JSON documents can be interpreted as JSON-LD without having to be modified by referencing a context via an HTTP Link Header @@ -9989,6 +10023,16 @@
profile
parameter which can be used to signal or request
framed document form. The profile URI identifying
framed document form is http://www.w3.org/ns/json-ld#framed
.
+
+ JSON-LD's media type also defines a
+ profile
parameter which can be used to identify a
+ script element in an HTML document containing a frame.
+ The first script element
+ of type application/ld+json;profile=http://www.w3.org/ns/json-ld#frame
+ will be used to find a frame.
+ This is similar to the mechanism described for retrieving contexts
+ from HTML documents as described in
+ .
This section describes features available to a full Processor.
+
JSON-LD content can be easily embedded in HTML [[HTML]] by placing
- it in a Script element with the type
attribute set to
+ it in a script element with the type
attribute set to
application/ld+json
. Doing so creates a
data block.
A JSON-LD document, whether embedded in HTML or otherwise,
+ may reference a context document by using a string value to @context
.
+ This string is interpreted as a URL to an external document from which
+ the context is loaded. In JSON-LD 1.1, this external document may also
+ be HTML containing a script element
+ with the type
attribute set to
+ application/ld+json;profile=http://www.w3.org/ns/json-ld#context
.
A processor processing a remote context which results in an HTML document
+ MUST locate the first script element
+ with the type
attribute set to
+ application/ld+json;profile=http://www.w3.org/ns/json-ld#context
,
+ or a specific script element targeted using a fragment identifier,
+ or the first script element of type application/ld+json
+ if no other is found.
Including a context definition within an HTML document provides a means + of documenting the context content, along with other information + such as the vocabulary definition.
+ +For example, a context may be defined within an HTML file as follows
+ (a subset of the Person context published at https://json-ld.org/contexts/person.html
):
+ ++ +
Using a previous example, we can reference https://json-ld.org/contexts/person.html
+ instead of https://json-ld.org/contexts/person.jsonld
+ and a JSON-LD processor will look for the context within the referenced HTML file.
In addition to using the type profile above, a context may be referenced using
+ a fragment identifier,
+ as described in .
+ Otherwise, the first script element
+ of type application/ld+json
will be used to find a context.
This specification defines four values for the profile
parameter.
This specification defines six values for the profile
parameter.
http://www.w3.org/ns/json-ld#expanded
http://www.w3.org/ns/json-ld#compacted
http://www.w3.org/ns/json-ld#context
http://www.w3.org/ns/json-ld#flattened
http://www.w3.org/ns/json-ld#frame
http://www.w3.org/ns/json-ld#framed
rdf:JSON
datatype.
application/ld+json;profile=http://www.w3.org/ns/json-ld#context
,
+ or application/ld+json
is used as the context for further processing.
+ This allows a mechanism for documenting the content of a context using HTML.application/ld+json;profile=http://www.w3.org/ns/json-ld#frame
.