diff --git a/Gemfile.lock b/Gemfile.lock index 37866348..144f32cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,10 @@ GIT remote: https://github.com/ruby-rdf/json-ld.git - revision: 74095b73cdb722b681f34d0f165599c9cb48d844 + revision: 031d3e7b958d39f7ecd001aa3f617bb8c2e65d44 branch: develop specs: json-ld (3.0.2) + htmlentities (~> 4.3) json-canonicalization (~> 0.1) link_header (~> 0.0, >= 0.0.8) multi_json (~> 1.13) @@ -36,7 +37,7 @@ GEM i18n (1.6.0) concurrent-ruby (~> 1.0) json-canonicalization (0.1.0) - json-ld-preloaded (3.0.2) + json-ld-preloaded (3.0.3) json-ld (~> 3.0) multi_json (~> 1.12) rdf (~> 3.0) @@ -74,7 +75,7 @@ GEM sparql-client (~> 3.0) mini_portile2 (2.4.0) multi_json (1.13.1) - net-http-persistent (3.0.1) + net-http-persistent (3.1.0) connection_pool (~> 2.2) nokogiri (1.10.3) mini_portile2 (~> 2.4.0) @@ -82,7 +83,7 @@ GEM nokogiri public_suffix (3.1.1) rack (2.0.7) - rake (12.3.2) + rake (12.3.3) rdf (3.0.12) hamster (~> 3.0) link_header (~> 0.0, >= 0.0.8) @@ -134,7 +135,7 @@ GEM rdf-turtle (3.0.6) ebnf (~> 1.1) rdf (~> 3.0) - rdf-vocab (3.0.7) + rdf-vocab (3.0.8) rdf (~> 3.0, >= 3.0.11) rdf-xsd (3.0.1) rdf (~> 3.0) diff --git a/common/terms.html b/common/terms.html index 88bf1e17..044b7478 100644 --- a/common/terms.html +++ b/common/terms.html @@ -225,6 +225,12 @@ A named graph created from the value of a map entry having an expanded term definition where @container is set to @graph. +
included map
+ An included map is a map of entries where the key + is interpreted as a vocabulary-relative IRI, and the value is a node object, value object, + list object, or an array of any of the above. + An included map contains values which may be referenced by terms of type `@included`, + for which the references are replaced with values from that map when expanding a document.
index map
An index map is a map value of a term defined with @container set to @index, @@ -331,7 +337,7 @@ or an expanded term definition.
type map
- An type map is a map value of a term + A type map is a map value of a term defined with @container set to @type, whose keys are interpreted as IRIs representing the @type of the associated node object; diff --git a/index.html b/index.html index b88a18d6..7079c248 100644 --- a/index.html +++ b/index.html @@ -608,6 +608,11 @@

Syntax Tokens and Keywords

Used in a context definition to load an external context within which the containing context definition is merged. This can be useful to add JSON-LD 1.1 features to JSON-LD 1.0 contexts.
+
`@included`
+ Used in in a top-level node object to define an included map, + allowing properties of the `@included` to reference shared values which are + copied during expansion. +

All keys, keywords, and values in JSON-LD are case-sensitive.

@@ -6755,6 +6760,11 @@

Using the Document Base for the Default Vocabulary

Node Type Indexing
As described in , node type indexing allows an IRI to reference a node and be interpreted as a type of that node.
+
Shared Value Indexing
As described in , + property values which may be shared among a number of different node objects, can be + collected into an included map, which provides for a central location for referencing such shared values. + When expanded, the values are extracted from the included map to replace the indexes in + the property values with the referenced values.

See for other uses of indexing in JSON-LD.

@@ -8270,6 +8280,243 @@

Using the Document Base for the Default Vocabulary

Type maps are a new feature in JSON-LD 1.1, requiring processing mode set to json-ld-1.1.

+ +

Shared Value Indexing

+

It is sometimes the case that a nested data structure will repeat information. + Using a node reference provides some opportunities for consolidating + the information into a single node object, but this does not help + in all cases.

+ +

Specifications such as [[[MICRODATA]]] [[MICRODATA]] have an itemref + mechanism which allows elements to be effectively copied within the [[DOM]]. + The included map feature provides a similar capability.

+ +

For an example, consider a node object containing a list of different items, + some of which share some common elements:

+ +
+  
+  
+ +

When expanded, this will copy the `enum:c6` and `enum:s2` elements + from the included map into the item which references it.

+ + + +

This feature becomes more powerful when combined with nested properties, + which allows the copied values to be promoted to be properties of the referencing node:

+ +
+  
+  
+ +

When expanded, this will copy the contents of `enum:c6` and `enum:s2` elements + from the included map directly into the item which references it, + rather than as the value of the nesting properties.

+ + +

Reverse Properties

@@ -11535,6 +11782,7 @@

Node Objects

@@ -11918,6 +12173,21 @@

Type Maps

added as a @type of the node object value when expanding.

+
+

Included Maps

+ +

An included map is used to provide a set of indexed values. + The keys of the a included map MUST be IRIs + (relative IRI, compact IRI (including blank node identifiers), or absolute IRI) + and the values node objects, value objects, list objects + or an array of any of the above. + An included map MAY appear as the value of `@included`, or an alias, + in a top-level node object, and MUST NOT appear in an embedded node object.

+ +

Entries in an included map are referenced from properties in a node object, where the + type mapping of the property term is `@included`.

+
+

Property Nesting

@@ -12225,7 +12495,7 @@

Keywords

or as the value of the @container key within an expanded term definition. The value of the @type key MUST be a term, absolute IRI, a relative IRI, or a compact IRI (including blank node identifiers). - Within an expanded term definition, its value may also be either @id or @vocab. + Within an expanded term definition, its value may also be either @included, @id, or @vocab. This keyword is described further in and . @@ -12246,6 +12516,13 @@

Keywords

This keyword is described further in , and . +
@included
+ The `@included` keyword MAY be aliased and MAY be used + as the value of @type in an expanded term definition. + Its value MUST be an included map. + This keyword is described further in , + and . +
@@ -13171,6 +13448,12 @@

Changes since JSON-LD Community Group Final Report

  • A context may contain an @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.
  • +
  • A top level node object may include an included map, + which is used to contain entries which can be substituted for property values + in other node objects, where that property has a type mapping to `@included`. + This allows values which are frequently repeated within a JSON-LD document to be consolidated + within an included map, allowing property values to be replaced with entries from + that included map upon expansion.