diff --git a/spec/latest/common/terms.html b/spec/latest/common/terms.html index 3f6ed8432..bdb0ce9ec 100644 --- a/spec/latest/common/terms.html +++ b/spec/latest/common/terms.html @@ -2,7 +2,7 @@

General Terminology

This document uses the following terms as defined in JSON [[!RFC7159]]. Refer - to the JSON Grammar section in [[!RFC7159]] for formal definitions.

+ to the JSON Grammar section in [[!RFC7159]] for formal definitions.

array
@@ -15,14 +15,14 @@

General Terminology

unless specifically defined (see Sets and Lists in the JSON-LD specification [[JSON-LD]]).
-
JSON object
+
JSON object
In the JSON serialization, an object structure is represented as a pair of curly brackets surrounding zero or more key-value pairs. A key is a string. A single colon comes after each key, separating the key from the value. A single comma separates a value from a following key. In JSON-LD the keys in an object MUST be unique. In the abstract representation a JSON object is equivalent to a dictionary (see [[WebIDL]]).
-
null
+
null
The use of the null value within JSON-LD is used to ignore or reset values. A key-value pair in the @context where the value, or the @id of the value, is null @@ -32,7 +32,7 @@

General Terminology

@value, @list, or @set is set to null in expanded form, then the entire JSON object is ignored.
-
number
+
number
In the JSON serialization, a number is similar to that used in most programming languages, except that the octal and hexadecimal formats are not used and that leading zeros are not allowed. @@ -43,7 +43,7 @@

General Terminology

scalar
A scalar is either a JSON string, number, true, or false.
-
string
+
string
A string is a sequence of zero or more Unicode (UTF-8) characters, wrapped in double quotes, using backslash escapes (if necessary). A character is represented as a single character string.
@@ -55,21 +55,21 @@

General Terminology

Furthermore, the following terminology is used throughout this document:

-
absolute IRI
+
absolute IRI
An absolute IRI is defined in [[!RFC3987]] containing a scheme along with a path and optional query and fragment segments.
base IRI
The base IRI is an absolute IRI established in the context, or is based on the JSON-LD document location. The base IRI is used to turn relative IRIs into absolute IRIs.
-
blank node
+
blank node
A node in a graph that is neither an IRI, nor a JSON-LD value, nor a list. A node does not contain a de-referenceable identifier because it is either ephemeral in nature or does not contain information that needs to be linked to from outside of the linked data graph. A blank node is assigned an identifier starting with the prefix _:.
-
blank node identifier
+
blank node identifier
A blank node identifier is a string that can be used as an identifier for a blank node within the scope of a JSON-LD document. Blank node identifiers begin with _:.
@@ -80,10 +80,10 @@

General Terminology

context
A a set of rules for interpreting a JSON-LD document as specified in The Context of the [[JSON-LD]] specification.
-
datatype IRI
+
datatype IRI
A datatype IRI as specified by [[RDF11-CONCEPTS]].
-
default graph
+
default graph
The default graph is the only graph in a JSON-LD document which has no graph name. When executing an algorithm, the graph where data should be placed if a named graph is not specified.
@@ -108,7 +108,7 @@

General Terminology

A frame object is a a dictionary element withing a frame which represents a specific portion of the frame matching either a node object or a value object in the input. -
graph name
+
graph name
The IRI identifying a named graph.
id map
An id map is a JSON object value of a term defined with @@ -131,7 +131,7 @@

General Terminology

set object, or an array of zero or more of the above possibilities.
-
IRI
+
IRI
An Internationalized Resource Identifier as described in [[!RFC3987]].
JSON-LD document
A JSON-LD document is a serialization of a collection of @@ -152,25 +152,25 @@

General Terminology

string, or an array of zero or more of the above possibilities.
-
language-tagged string
+
language-tagged string
A language-tagged string consists of a string and a non-empty language - tag as defined by [[!BCP47]]. The language tag MUST be well-formed according to - section 2.2.9 Classes of Conformance + tag as defined by [[!BCP47]]. The language tag MUST be well-formed according to + section 2.2.9 Classes of Conformance of [[!BCP47]], and is normalized to lowercase.
Linked Data
A set of documents, each containing a representation of a linked data graph.
-
linked data graph
+
linked data graph
A labeled directed graph, i.e., a set of nodes connected by edges, as specified in the Data Model section of the JSON-LD specification [[!JSON-LD]]. A linked data graph is a generalized representation of a - RDF graph + RDF graph as defined in [[!RDF-CONCEPTS]].
list
A list is an ordered sequence of IRIs, blank nodes, and JSON-LD values. - See RDF collection + See RDF collection in [[RDF-SCHEMA]].
list object
A list object is a JSON object that has an @list @@ -180,13 +180,13 @@

General Terminology

local context
A context that is specified within a JSON object, specified via the @context keyword.
-
named graph
+
named graph
A linked data graph that is identified by an IRI or blank node
nested property
A nested property is a property which is contained within an object referenced by a semantically meaningless nesting property.
-
node
+
node
Every node is an IRI, a blank node, a JSON-LD value, or a list. A piece of information that is represented in a linked data graph.
@@ -205,34 +205,34 @@

General Terminology

node reference
A node object used to reference a node having only the @id key.
-
object
+
object
A node in a linked data graph with at least one incoming edge. - See RDF objectin [[RDF11-CONCEPTS]].
+ See RDF objectin [[RDF11-CONCEPTS]].
prefix
A prefix is a term that expands to a vocabulary base IRI. It is typically used along with a suffix to form a compact IRI to create an IRI within a vocabulary.
property
The IRI label of an edge in a linked data graph. - See RDF predicate in [[RDF11-CONCEPTS]].
+ See RDF predicate in [[RDF11-CONCEPTS]].
quad
A piece of information that contains four items; a subject, a property, an object, and a graph name.
-
RDF dataset
+
RDF dataset
A dataset as specified by [[RDF11-CONCEPTS]] representing a collection of - RDF graphs.
-
RDF resource
+ RDF graphs.
+
RDF resource
A resource as specified by [[RDF11-CONCEPTS]].
-
RDF triple
+
RDF triple
A triple as specified by [[RDF11-CONCEPTS]].
relative IRI
A relative IRI is an IRI that is relative to some other absolute IRI.
set object
A set object is a JSON object that has an @set member.
-
subject
+
subject
A node in a linked data graph with at least one outgoing edge, related to an object node through a property. - See RDF subject in [[RDF11-CONCEPTS]].
+ See RDF subject in [[RDF11-CONCEPTS]].
term
A term is a short word defined in a context that MAY be expanded to an IRI
@@ -249,10 +249,10 @@

General Terminology

value MUST be a node object, or array of node objects. If the value contains a property expanding to @type, it's values are merged with the map value when expanding. -
typed literal
+
typed literal
A typed literal is a literal with an associated IRI which indicates the literal's datatype. - See RDF literal in [[!RDF-CONCEPTS]].
+ See RDF literal in [[!RDF-CONCEPTS]].
typed value
A typed value consists of a value, which is a string, and a type, which is an IRI.
@@ -322,7 +322,7 @@

Algorithm Terms

as a stack with elements from the previous processor state copied into a new processor state when entering a new JSON object. -
promise
+
promise
A promise is an object that represents the eventual result of a single asynchronous operation. Promises are defined in [[ECMASCRIPT-6.0]].
require all flag
diff --git a/spec/latest/json-ld-api/index.html b/spec/latest/json-ld-api/index.html index 0b324f107..157ca77d1 100644 --- a/spec/latest/json-ld-api/index.html +++ b/spec/latest/json-ld-api/index.html @@ -177,7 +177,7 @@

Introduction

To understand the basics in this specification you must first be familiar with - JSON, which is detailed in [[!RFC7159]]. You must also understand the + JSON, which is detailed in [[!RFC7159]]. You must also understand the JSON-LD syntax defined in [[!JSON-LD]], which is the base syntax used by all of the algorithms in this document. To understand the API and how it is intended to operate in a programming environment, it is useful to have working @@ -717,16 +717,16 @@

Algorithm

  1. Set context to the result of resolving value against the base IRI which is established as specified in - section 5.1 Establishing a Base URI + section 5.1 Establishing a Base URI of [[!RFC3986]]. Only the basic algorithm in - section 5.2 + section 5.2 of [[!RFC3986]] is used; neither - Syntax-Based Normalization nor - Scheme-Based Normalization + Syntax-Based Normalization nor + Scheme-Based Normalization are performed. Characters additionally allowed in IRI references are treated in the same way that unreserved characters are treated in URI references, per - section 6.5 + section 6.5 of [[!RFC3987]].
  2. If context is in the remote contexts array, a recursive context inclusion @@ -1152,13 +1152,13 @@

    Algorithm

  3. Otherwise, if document relative is true, set value to the result of resolving value against the base IRI. Only the basic algorithm in - section 5.2 + section 5.2 of [[!RFC3986]] is used; neither - Syntax-Based Normalization nor - Scheme-Based Normalization + Syntax-Based Normalization nor + Scheme-Based Normalization are performed. Characters additionally allowed in IRI references are treated in the same way that unreserved characters are treated in URI references, per - section 6.5 + section 6.5 of [[!RFC3987]].
  4. Return value as is.
@@ -1278,6 +1278,22 @@

Algorithm

Context Processing algorithm, passing active context and the value of the @context key as local context. +
  • For each key/value pair in element + ordered lexicographically by key where key expands + to @type using the + IRI Expansion algorithm, + passing active context, key for + value, and true for vocab: +
      +
    1. For each term which is a value of value, + if term's term definition in active context + has a local context, set active context to the result + to the result of the + Context Processing algorithm, + passing active context and the value of the + term's local context as local context.
    2. +
    +
  • Initialize an empty JSON object, result.
  • For each key and value in element, ordered lexicographically by key: @@ -1494,12 +1510,21 @@

    Algorithm

  • For each key-value pair index-index value in value, ordered lexicographically by index:
      +
    1. If container mapping is @type, + and index's term definition in + term context has a local context, set + map context to the result of the Context Processing + algorithm, passing term context as active context and the + value of the index's local context as + local context. Otherwise, set map context + to term context.
    2. If index value is not an array set it to an array containing only index value.
    3. Initialize index value to the result of using this algorithm recursively, passing - term context as active context, + map context as active context, key as active property, and index value as element.
    4. For each item in index value: @@ -1512,13 +1537,23 @@

      Algorithm

    5. Otherwise, if container mapping is @id and item does not have the key @id, add the key-value pair - (@id-index) to - item.
    6. + (@id-expanded index) to + item, where expanded index is set to the result of + using the + IRI Expansion algorithm, + passing active context, index, and true + for document relative.
    7. Otherwise, if container mapping is @type - set types to the concatenation of index - value with any existing values of - @type in item and add the - key-value pair (@type-types) to + set types to the concatenation of + expanded index with any existing values of + @type in item, where + expanded index is set to the result of using + the IRI Expansion + algorithm, passing active context, + index, true for vocab, + and true for document relative + and add the key-value pair + (@type-types) to item.
    8. Append item to expanded value.
    @@ -1873,12 +1908,28 @@

    Algorithm

  • Initialize compacted value to an empty array.
  • For each item expanded type in - expanded value, append the result of - of using the IRI Compaction algorithm, - passing active context, inverse context, - expanded type for iri, and - true for vocab, - to compacted value.
  • + expanded value: +
      +
    1. Set term to the result of + of using the IRI Compaction algorithm, + passing active context, inverse context, + expanded type for iri, and + true for vocab.
    2. +
    3. If the term definition for term has a + local context: +
        +
      1. Set active context to the result of the + Context Processing algorithm, + passing active context and the value of term's + local context as local context.
      2. +
      3. Set inverse context using the + Inverse Context Creation algorithm + using active context.
      4. +
      +
    4. +
    5. Append term, to compacted value.
    6. +
    +
  • If compacted value contains only one item (it has a length of 1), then set compacted value to its only item.
  • @@ -2082,22 +2133,24 @@

    Algorithm

    compacted item contains the key @value, then set compacted item to the value associated with its @value key. -
  • If container is @index, - set map key to the value associated with - with the key that equals container in - expanded item.
  • If container is @id, set - map key to the value associated with the key that equals - compacted container in compacted item - and remove that key-value pair from compacted item.
  • + map key to the result of calling the IRI Compaction algorithm + passing active context and the value associated with + the key that equals compacted container in + compacted item as iri.
  • If container is @type, - set map key to the first value associated with - the key that equals container in expanded - item. If there are remaining values in compacted - item for compacted container, set the value - of compacted container in compacted - value to those remaining values. Otherwise, remove - that key-value pair from compacted item.
  • + set map key to the result of calling the IRI Compaction algorithm + passing active context, the the first value + associated with the key that equals compacted + container in compacted item as + iri, and true for vocab. + If there are remaining values in compacted item + for compacted container, set the value of + compacted container in compacted value + to those remaining values. Otherwise, remove that + key-value pair from compacted item.
  • If map key is not a key in map object, then set this key's value in map object to compacted item. Otherwise, if the value @@ -3299,7 +3352,7 @@

    Algorithm

    part (the result of a modulo‑1 operation) or value is a number and datatype equals xsd:double, convert value to a string in canonical lexical form of - an xsd:double as defined in [[!XMLSCHEMA11-2]] + an xsd:double as defined in [[!XMLSCHEMA11-2]] and described in . If datatype is null, set it to @@ -3309,7 +3362,7 @@

    Algorithm

    is a number and datatype equals xsd:integer, convert value to a string in canonical lexical form of - an xsd:integer as defined in [[!XMLSCHEMA11-2]] + an xsd:integer as defined in [[!XMLSCHEMA11-2]] and described in . If datatype is null, set it to @@ -3386,7 +3439,7 @@

    Serialize RDF as JSON-LD Algorithm

    named graphs into a JSON-LD document.

    In the RDF abstract syntax, RDF literals have a - lexical form, as defined + lexical form, as defined in [[RDF11-CONCEPTS]]. The form of these literals is used when creating JSON-LD values based on these literals.

    @@ -3797,7 +3850,7 @@

    The Application Programming Interface

    The JSON-LD API uses Promises to represent the result of the various asynchronous operations. - Promises are defined in [[ECMASCRIPT-6.0]]. + Promises are defined in [[ECMASCRIPT-6.0]]. General use within specifications can be found in [[promises-guide]].

    diff --git a/spec/latest/json-ld-framing/index.html b/spec/latest/json-ld-framing/index.html index b98299256..cd25463d1 100644 --- a/spec/latest/json-ld-framing/index.html +++ b/spec/latest/json-ld-framing/index.html @@ -199,7 +199,7 @@

    How to Read this Document

    To understand the basics in this specification you must first be familiar with -JSON, which is detailed in [[!RFC7159]]. You must also understand the +JSON, which is detailed in [[!RFC7159]]. You must also understand the JSON-LD Syntax [[!JSON-LD]], which is the base syntax used by all of the algorithms in this document, and the JSON-LD API [[!JSON-LD-API]]. To understand the API and how it is diff --git a/spec/latest/json-ld/index.html b/spec/latest/json-ld/index.html index 5b9ef5a6d..b63594d2d 100644 --- a/spec/latest/json-ld/index.html +++ b/spec/latest/json-ld/index.html @@ -220,7 +220,7 @@

    How to Read this Document

    providing a standard library interface for common JSON-LD operations.

    To understand the basics in this specification you must first be familiar with - JSON, which is detailed in [[!RFC7159]].

    + JSON, which is detailed in [[!RFC7159]].

    This document almost exclusively uses the term IRI (Internationalized Resource Indicator) @@ -450,7 +450,7 @@

    Basic Concepts

    tokens such as "name", "homepage", etc.

    Linked Data, and the Web in general, uses IRIs - (Internationalized Resource Identifiers as described in [[!RFC3987]]) for unambiguous + (Internationalized Resource Identifiers as described in [[!RFC3987]]) for unambiguous identification. The idea is to use IRIs to assign unambiguous identifiers to data that may be of use to other developers. It is useful for terms, @@ -571,7 +571,7 @@

    The Context

    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 + referencing a context via an HTTP Link Header as described in . It is also possible to apply a custom context using the JSON-LD API [[JSON-LD-API]].

    @@ -613,12 +613,12 @@

    The Context

    IRIs

    -

    IRIs (Internationalized Resource Identifiers +

    IRIs (Internationalized Resource Identifiers [[!RFC3987]]) are fundamental to Linked Data as that is how most nodes and properties are identified. In JSON-LD, IRIs may be represented as an absolute IRI or a relative IRI. An - absolute IRI is defined in [[!RFC3987]] as containing a + absolute IRI is defined in [[!RFC3987]] as containing a scheme along with path and optional query and fragment segments. A relative IRI is an IRI that is relative to some other absolute IRI. @@ -863,7 +863,7 @@

    Base IRI

    JSON-LD allows IRIs to be specified in a relative form which is resolved against the document base according - section 5.1 Establishing a Base URI + section 5.1 Establishing a Base URI of [[RFC3986]]. The base IRI may be explicitly set with a context using the @base keyword.

    @@ -1491,7 +1491,7 @@

    Advanced Context Usage

    Interpreting JSON as JSON-LD

    Ordinary JSON documents can be interpreted as JSON-LD by referencing a JSON-LD - context document in an HTTP Link Header. Doing so allows JSON to + context document in an HTTP Link Header. Doing so allows JSON to be unambiguously machine-readable without requiring developers to drastically change their documents and provides an upgrade path for existing infrastructure without breaking existing clients that rely on the application/json @@ -1500,7 +1500,7 @@

    Interpreting JSON as JSON-LD

    In order to use an external context with an ordinary JSON document, an author MUST specify an IRI to a valid JSON-LD document in - an HTTP Link Header [[!RFC5988]] using the http://www.w3.org/ns/json-ld#context + an HTTP Link Header [[!RFC5988]] using the http://www.w3.org/ns/json-ld#context link relation. The referenced document MUST have a top-level JSON object. The @context subtree within that object is added to the top-level JSON object of the referencing document. If an array @@ -1510,7 +1510,7 @@

    Interpreting JSON as JSON-LD

    of the @context subtree in the referenced document MUST be discarded. Effectively this means that the active context is initialized with the referenced external context. A response MUST NOT - contain more than one HTTP Link Header [[!RFC5988]] using the + contain more than one HTTP Link Header [[!RFC5988]] using the http://www.w3.org/ns/json-ld#context link relation.

    The following example demonstrates the use of an external context with an @@ -1542,7 +1542,7 @@

    Interpreting JSON as JSON-LD

    served with the application/ld+json media type MUST have all context information, including references to external contexts, within the body of the document. Contexts linked via a - http://www.w3.org/ns/json-ld#context HTTP Link Header MUST be + http://www.w3.org/ns/json-ld#context HTTP Link Header MUST be ignored for such documents.

    @@ -1571,7 +1571,7 @@

    String Internationalization

    The example above would associate the ja language code with the two strings 花澄 and 科学者. - Languages codes are defined in [[!BCP47]]. The default language applies to all + Languages codes are defined in [[!BCP47]]. The default language applies to all string values that are not type coerced.

    To clear the default language for a subtree, @language can @@ -2150,7 +2150,7 @@

    Scoped Contexts

    { "name": "http://schema.org/name", "interest": { - "@id":"http://xmlns.com/foaf/0.1/interest", + "@id": "http://xmlns.com/foaf/0.1/interest", ****"@context": {"@vocab": "http://xmlns.com/foaf/0.1/"}**** } }, @@ -2186,7 +2186,6 @@

    Scoped Contexts

    expanded term definitions to create reverse properties as shown in the following example:

    -
       
       
    + +

    Scoping can also be performed using a term used as a value of @type:

    + +
    +  
    +  
    + +

    Scoping on @type is useful when common properties are used to relate things of different types, where the vocabularies in use within different entities calls for different context scoping. For example, `hasPart`/`partOf` may be common terms used in a document, but mean different things depending on the context.

    @@ -3017,7 +3045,7 @@

    Data Model

    JSON-LD is a serialization format for Linked Data based on JSON. It is therefore important to distinguish between the syntax, which is defined by JSON in [[!RFC7159]], and the data model which is - an extension of the RDF data model [[!RDF11-CONCEPTS]]. The precise + an extension of the RDF data model [[!RDF11-CONCEPTS]]. The precise details of how JSON-LD relates to the RDF data model are given in .

    @@ -3071,14 +3099,14 @@

    Data Model

  • A typed value consists of a value, which is a string, and a type, which is an IRI.
  • A language-tagged string - consists of a string and a non-empty language tag as defined by [[BCP47]]. + consists of a string and a non-empty language tag as defined by [[BCP47]]. The language tag MUST be well-formed according to section - 2.2.9 Classes of Conformance + 2.2.9 Classes of Conformance of [[BCP47]].
  • A list is a sequence of zero or more IRIs, blank nodes, and JSON-LD values. Lists are interpreted as - RDF list structures [[RDF11-MT]].
  • + RDF list structures [[RDF11-MT]].
  • JSON-LD documents MAY contain data @@ -3098,7 +3126,7 @@

    JSON-LD Grammar

    This appendix restates the syntactic conventions described in the previous sections more formally.

    -

    A JSON-LD document MUST be valid JSON text as described +

    A JSON-LD document MUST be valid JSON text as described in [[!RFC7159]].

    A JSON-LD document MUST be a single node object @@ -3277,7 +3305,7 @@

    Value Objects

    an absolute IRI, a relative IRI, or null.

    The value associated with the @language key MUST have the - lexical form described in [[!BCP47]], or be null.

    + lexical form described in [[!BCP47]], or be null.

    The value associated with the @index key MUST be a string.

    @@ -3429,7 +3457,7 @@

    Context Definitions

    and @vocab.

    If the context definition has an @language key, - its value MUST have the lexical form described in [[!BCP47]] or be null.

    + its value MUST have the lexical form described in [[!BCP47]] or be null.

    If the context definition has an @base key, its value MUST be an absolute IRI, a relative IRI, @@ -3475,7 +3503,7 @@

    Context Definitions

    keyword @id or @vocab.

    If the expanded term definition contains the @language keyword, - its value MUST have the lexical form described in [[!BCP47]] or be null.

    + its value MUST have the lexical form described in [[!BCP47]] or be null.

    If the expanded term definition contains the @container keyword, its value MUST be either @list, @set, @@ -3506,12 +3534,12 @@

    Context Definitions

    Relationship to RDF

    JSON-LD is a - concrete RDF syntax + concrete RDF syntax as described in [[RDF11-CONCEPTS]]. Hence, a JSON-LD document is both an RDF document and a JSON document and correspondingly represents an instance of an RDF data model. However, JSON-LD also extends the RDF data model to optionally allow JSON-LD to serialize - generalized RDF Datasets. + generalized RDF Datasets. The JSON-LD extensions to the RDF data model are:

    @@ -3569,7 +3597,7 @@

    Relationship to RDF

    Even though JSON-LD serializes generalized RDF Datasets, it can - also be used as a RDF graph source. + also be used as a RDF graph source. In that case, a consumer MUST only use the default graph and ignore all named graphs. This allows servers to expose data in languages such as Turtle and JSON-LD using content negotiation.

    @@ -4101,7 +4129,7 @@

    application/ld+json

    When processing the "profile" media type parameter, it is important to note that its value contains one or more URIs and not IRIs. In some cases it might therefore be necessary to convert between IRIs and URIs as specified in - section 3 Relationship between IRIs and URIs + section 3 Relationship between IRIs and URIs of [[RFC3987]].

    @@ -4169,7 +4197,7 @@

    application/ld+json

    Fragment identifiers used with application/ld+json are treated as in RDF syntaxes, as per - RDF 1.1 Concepts and Abstract Syntax + RDF 1.1 Concepts and Abstract Syntax [[RDF11-CONCEPTS]].

    diff --git a/test-suite/tests/compact-m005-context.jsonld b/test-suite/tests/compact-m005-context.jsonld new file mode 100644 index 000000000..5ebfbc699 --- /dev/null +++ b/test-suite/tests/compact-m005-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "idmap": {"@container": "@id"} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m005-in.jsonld b/test-suite/tests/compact-m005-in.jsonld new file mode 100644 index 000000000..fe15d6377 --- /dev/null +++ b/test-suite/tests/compact-m005-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/idmap": [ + {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/compact-m005-out.jsonld b/test-suite/tests/compact-m005-out.jsonld new file mode 100644 index 000000000..68c15c472 --- /dev/null +++ b/test-suite/tests/compact-m005-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example/", + "ex": "http://example.org/", + "idmap": {"@container": "@id"} + }, + "idmap": { + "ex:foo": {"label": "Object with @id "} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m006-context.jsonld b/test-suite/tests/compact-m006-context.jsonld new file mode 100644 index 000000000..6540eb51d --- /dev/null +++ b/test-suite/tests/compact-m006-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "typemap": {"@container": "@type"} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m006-in.jsonld b/test-suite/tests/compact-m006-in.jsonld new file mode 100644 index 000000000..a6cfccfeb --- /dev/null +++ b/test-suite/tests/compact-m006-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example/Foo"]} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/compact-m006-out.jsonld b/test-suite/tests/compact-m006-out.jsonld new file mode 100644 index 000000000..ce359b452 --- /dev/null +++ b/test-suite/tests/compact-m006-out.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example/", + "typemap": {"@container": "@type"} + }, + "typemap": { + "Foo": {"label": "Object with @type "} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m007-context.jsonld b/test-suite/tests/compact-m007-context.jsonld new file mode 100644 index 000000000..6007891a7 --- /dev/null +++ b/test-suite/tests/compact-m007-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m007-in.jsonld b/test-suite/tests/compact-m007-in.jsonld new file mode 100644 index 000000000..16baea770 --- /dev/null +++ b/test-suite/tests/compact-m007-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/compact-m007-out.jsonld b/test-suite/tests/compact-m007-out.jsonld new file mode 100644 index 000000000..757aeaa11 --- /dev/null +++ b/test-suite/tests/compact-m007-out.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"@type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/test-suite/tests/compact-m008-context.jsonld b/test-suite/tests/compact-m008-context.jsonld new file mode 100644 index 000000000..dcaf0666c --- /dev/null +++ b/test-suite/tests/compact-m008-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": {"@type": "@id"}}}, + "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m008-in.jsonld b/test-suite/tests/compact-m008-in.jsonld new file mode 100644 index 000000000..c173b8948 --- /dev/null +++ b/test-suite/tests/compact-m008-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example/bar": [{"@id": "http://example/baz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/compact-m008-out.jsonld b/test-suite/tests/compact-m008-out.jsonld new file mode 100644 index 000000000..05c9f1d61 --- /dev/null +++ b/test-suite/tests/compact-m008-out.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": {"@type": "@id"}}}, + "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + }, + "a": {"@type": "Foo", "bar": "http://example/baz"} +} \ No newline at end of file diff --git a/test-suite/tests/compact-m009-context.jsonld b/test-suite/tests/compact-m009-context.jsonld new file mode 100644 index 000000000..99becb5a6 --- /dev/null +++ b/test-suite/tests/compact-m009-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "type": "@type", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m009-in.jsonld b/test-suite/tests/compact-m009-in.jsonld new file mode 100644 index 000000000..16baea770 --- /dev/null +++ b/test-suite/tests/compact-m009-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/compact-m009-out.jsonld b/test-suite/tests/compact-m009-out.jsonld new file mode 100644 index 000000000..e0b472b16 --- /dev/null +++ b/test-suite/tests/compact-m009-out.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "type": "@type", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/test-suite/tests/compact-m010-context.jsonld b/test-suite/tests/compact-m010-context.jsonld new file mode 100644 index 000000000..cf932f7e8 --- /dev/null +++ b/test-suite/tests/compact-m010-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m010-in.jsonld b/test-suite/tests/compact-m010-in.jsonld new file mode 100644 index 000000000..59a1fb53f --- /dev/null +++ b/test-suite/tests/compact-m010-in.jsonld @@ -0,0 +1,8 @@ +[ + { + "@type": ["http://example/Foo"], + "http://example/bar": [{ + "http://example/baz": [{"@id": "http://example/buzz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/compact-m010-out.jsonld b/test-suite/tests/compact-m010-out.jsonld new file mode 100644 index 000000000..c2b6d1109 --- /dev/null +++ b/test-suite/tests/compact-m010-out.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + }, + "@type": "Foo", + "bar": {"baz": "buzz"} +} \ No newline at end of file diff --git a/test-suite/tests/compact-m011-context.jsonld b/test-suite/tests/compact-m011-context.jsonld new file mode 100644 index 000000000..38c9c4e01 --- /dev/null +++ b/test-suite/tests/compact-m011-context.jsonld @@ -0,0 +1,6 @@ +{ + "@context": { + "@vocab": "http://example/", + "B": {"@context": {"c": "http://example.org/c"}} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m011-in.jsonld b/test-suite/tests/compact-m011-in.jsonld new file mode 100644 index 000000000..1057b0ad8 --- /dev/null +++ b/test-suite/tests/compact-m011-in.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example/a": [{ + "@type": ["http://example/B"], + "http://example.com/a": [{"@value": "A in example.com"}], + "http://example.org/c": [{"@value": "C in example.org"}] + }], + "http://example/c": [{"@value": "C in example"}] +}] \ No newline at end of file diff --git a/test-suite/tests/compact-m011-out.jsonld b/test-suite/tests/compact-m011-out.jsonld new file mode 100644 index 000000000..b312d1a2d --- /dev/null +++ b/test-suite/tests/compact-m011-out.jsonld @@ -0,0 +1,12 @@ +{ + "@context": { + "@vocab": "http://example/", + "B": {"@context": {"c": "http://example.org/c"}} + }, + "a": { + "@type": "B", + "c": "C in example.org", + "http://example.com/a": "A in example.com" + }, + "c": "C in example" +} \ No newline at end of file diff --git a/test-suite/tests/compact-m012-context.jsonld b/test-suite/tests/compact-m012-context.jsonld new file mode 100644 index 000000000..16ee43db0 --- /dev/null +++ b/test-suite/tests/compact-m012-context.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "typemap": {"@container": "@type"}, + "Type": {"@context": {"a": "http://example.org/a"}} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-m012-in.jsonld b/test-suite/tests/compact-m012-in.jsonld new file mode 100644 index 000000000..e1da44ee2 --- /dev/null +++ b/test-suite/tests/compact-m012-in.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/compact-m012-out.jsonld b/test-suite/tests/compact-m012-out.jsonld new file mode 100644 index 000000000..3e48d6e63 --- /dev/null +++ b/test-suite/tests/compact-m012-out.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example/", + "typemap": {"@container": "@type"}, + "Type": {"@context": {"a": "http://example.org/a"}} + }, + "typemap": { + "Type": {"a": "Object with @type "} + } +} \ No newline at end of file diff --git a/test-suite/tests/compact-manifest.jsonld b/test-suite/tests/compact-manifest.jsonld index cc4fdff92..abcd5b891 100644 --- a/test-suite/tests/compact-manifest.jsonld +++ b/test-suite/tests/compact-manifest.jsonld @@ -666,6 +666,78 @@ "context": "compact-m004-context.jsonld", "expect": "compact-m004-out.jsonld", "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm005", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Indexes to object using compact IRI @id", + "purpose": "Compaction using @container: @id", + "input": "compact-m005-in.jsonld", + "context": "compact-m005-context.jsonld", + "expect": "compact-m005-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm006", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "Indexes using compacted @type", + "purpose": "Compaction using @container: @type", + "input": "compact-m006-in.jsonld", + "context": "compact-m006-context.jsonld", + "expect": "compact-m006-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm007", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "adding new term", + "purpose": "scoped context on @type", + "input": "compact-m007-in.jsonld", + "context": "compact-m007-context.jsonld", + "expect": "compact-m007-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm008", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "overriding a term", + "purpose": "scoped context on @type", + "input": "compact-m008-in.jsonld", + "context": "compact-m008-context.jsonld", + "expect": "compact-m008-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm009", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "alias of @type", + "purpose": "scoped context on @type", + "input": "compact-m009-in.jsonld", + "context": "compact-m009-context.jsonld", + "expect": "compact-m009-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm010", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "deep @context affects nested nodes", + "purpose": "scoped context on @type", + "input": "compact-m010-in.jsonld", + "context": "compact-m010-context.jsonld", + "expect": "compact-m010-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm011", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "scoped context layers on intemediate contexts", + "purpose": "scoped context on @type", + "input": "compact-m011-in.jsonld", + "context": "compact-m011-context.jsonld", + "expect": "compact-m011-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm012", + "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], + "name": "When type is in a type map", + "purpose": "scoped context on @type", + "input": "compact-m012-in.jsonld", + "context": "compact-m012-context.jsonld", + "expect": "compact-m012-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} }, { "@id": "#tn001", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], diff --git a/test-suite/tests/expand-m005-in.jsonld b/test-suite/tests/expand-m005-in.jsonld new file mode 100644 index 000000000..e7de76b9b --- /dev/null +++ b/test-suite/tests/expand-m005-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example/", + "idmap": {"@container": "@id"} + }, + "idmap": { + "foo": {"label": "Object with @id "} + } +} \ No newline at end of file diff --git a/test-suite/tests/expand-m005-out.jsonld b/test-suite/tests/expand-m005-out.jsonld new file mode 100644 index 000000000..fe15d6377 --- /dev/null +++ b/test-suite/tests/expand-m005-out.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/idmap": [ + {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/expand-m006-in.jsonld b/test-suite/tests/expand-m006-in.jsonld new file mode 100644 index 000000000..ce359b452 --- /dev/null +++ b/test-suite/tests/expand-m006-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "@vocab": "http://example/", + "typemap": {"@container": "@type"} + }, + "typemap": { + "Foo": {"label": "Object with @type "} + } +} \ No newline at end of file diff --git a/test-suite/tests/expand-m006-out.jsonld b/test-suite/tests/expand-m006-out.jsonld new file mode 100644 index 000000000..a6cfccfeb --- /dev/null +++ b/test-suite/tests/expand-m006-out.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example/Foo"]} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/expand-m007-in.jsonld b/test-suite/tests/expand-m007-in.jsonld new file mode 100644 index 000000000..2526572e4 --- /dev/null +++ b/test-suite/tests/expand-m007-in.jsonld @@ -0,0 +1,9 @@ +{ + "@context": { + "typemap": {"@id": "http://example/typemap", "@container": "@type"}, + "label": "http://example/label" + }, + "typemap": { + "Foo": {"label": "Object with @type "} + } +} \ No newline at end of file diff --git a/test-suite/tests/expand-m007-out.jsonld b/test-suite/tests/expand-m007-out.jsonld new file mode 100644 index 000000000..24b1b1cdb --- /dev/null +++ b/test-suite/tests/expand-m007-out.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example.org/Foo"]} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/expand-m008-in.jsonld b/test-suite/tests/expand-m008-in.jsonld new file mode 100644 index 000000000..757aeaa11 --- /dev/null +++ b/test-suite/tests/expand-m008-in.jsonld @@ -0,0 +1,7 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"@type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/test-suite/tests/expand-m008-out.jsonld b/test-suite/tests/expand-m008-out.jsonld new file mode 100644 index 000000000..16baea770 --- /dev/null +++ b/test-suite/tests/expand-m008-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/expand-m009-in.jsonld b/test-suite/tests/expand-m009-in.jsonld new file mode 100644 index 000000000..05c9f1d61 --- /dev/null +++ b/test-suite/tests/expand-m009-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"bar": {"@type": "@id"}}}, + "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"} + }, + "a": {"@type": "Foo", "bar": "http://example/baz"} +} \ No newline at end of file diff --git a/test-suite/tests/expand-m009-out.jsonld b/test-suite/tests/expand-m009-out.jsonld new file mode 100644 index 000000000..c173b8948 --- /dev/null +++ b/test-suite/tests/expand-m009-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example/bar": [{"@id": "http://example/baz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/expand-m010-in.jsonld b/test-suite/tests/expand-m010-in.jsonld new file mode 100644 index 000000000..e0b472b16 --- /dev/null +++ b/test-suite/tests/expand-m010-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "type": "@type", + "Foo": {"@context": {"bar": "http://example.org/bar"}} + }, + "a": {"type": "Foo", "bar": "baz"} +} \ No newline at end of file diff --git a/test-suite/tests/expand-m010-out.jsonld b/test-suite/tests/expand-m010-out.jsonld new file mode 100644 index 000000000..16baea770 --- /dev/null +++ b/test-suite/tests/expand-m010-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "http://example/a": [{ + "@type": ["http://example/Foo"], + "http://example.org/bar": [{"@value": "baz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/expand-m011-in.jsonld b/test-suite/tests/expand-m011-in.jsonld new file mode 100644 index 000000000..c2b6d1109 --- /dev/null +++ b/test-suite/tests/expand-m011-in.jsonld @@ -0,0 +1,8 @@ +{ + "@context": { + "@vocab": "http://example/", + "Foo": {"@context": {"baz": {"@type": "@vocab"}}} + }, + "@type": "Foo", + "bar": {"baz": "buzz"} +} \ No newline at end of file diff --git a/test-suite/tests/expand-m011-out.jsonld b/test-suite/tests/expand-m011-out.jsonld new file mode 100644 index 000000000..59a1fb53f --- /dev/null +++ b/test-suite/tests/expand-m011-out.jsonld @@ -0,0 +1,8 @@ +[ + { + "@type": ["http://example/Foo"], + "http://example/bar": [{ + "http://example/baz": [{"@id": "http://example/buzz"}] + }] + } +] \ No newline at end of file diff --git a/test-suite/tests/expand-m012-in.jsonld b/test-suite/tests/expand-m012-in.jsonld new file mode 100644 index 000000000..809997b59 --- /dev/null +++ b/test-suite/tests/expand-m012-in.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@vocab": "http://example/", + "B": {"@context": {"c": "http://example.org/c"}} + }, + "a": { + "@context": {"@vocab": "http://example.com/"}, + "@type": "B", + "a": "A in example.com", + "c": "C in example.org" + }, + "c": "C in example" +} \ No newline at end of file diff --git a/test-suite/tests/expand-m012-out.jsonld b/test-suite/tests/expand-m012-out.jsonld new file mode 100644 index 000000000..1057b0ad8 --- /dev/null +++ b/test-suite/tests/expand-m012-out.jsonld @@ -0,0 +1,8 @@ +[{ + "http://example/a": [{ + "@type": ["http://example/B"], + "http://example.com/a": [{"@value": "A in example.com"}], + "http://example.org/c": [{"@value": "C in example.org"}] + }], + "http://example/c": [{"@value": "C in example"}] +}] \ No newline at end of file diff --git a/test-suite/tests/expand-m013-in.jsonld b/test-suite/tests/expand-m013-in.jsonld new file mode 100644 index 000000000..3e48d6e63 --- /dev/null +++ b/test-suite/tests/expand-m013-in.jsonld @@ -0,0 +1,10 @@ +{ + "@context": { + "@vocab": "http://example/", + "typemap": {"@container": "@type"}, + "Type": {"@context": {"a": "http://example.org/a"}} + }, + "typemap": { + "Type": {"a": "Object with @type "} + } +} \ No newline at end of file diff --git a/test-suite/tests/expand-m013-out.jsonld b/test-suite/tests/expand-m013-out.jsonld new file mode 100644 index 000000000..e1da44ee2 --- /dev/null +++ b/test-suite/tests/expand-m013-out.jsonld @@ -0,0 +1,5 @@ +[{ + "http://example/typemap": [ + {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]} + ] +}] \ No newline at end of file diff --git a/test-suite/tests/expand-manifest.jsonld b/test-suite/tests/expand-manifest.jsonld index 832c1851f..d0f749231 100644 --- a/test-suite/tests/expand-manifest.jsonld +++ b/test-suite/tests/expand-manifest.jsonld @@ -630,6 +630,78 @@ "input": "expand-m004-in.jsonld", "expect": "expand-m004-out.jsonld", "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm005", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Adds expanded @id to object", + "purpose": "Expansion using @container: @id", + "input": "expand-m005-in.jsonld", + "expect": "expand-m005-out.jsonld", + "option": {"base": "http://example.org/", "processingMode": "json-ld-1.1"} + }, { + "@id": "#tm006", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Adds vocabulary expanded @type to object", + "purpose": "Expansion using @container: @type", + "input": "expand-m006-in.jsonld", + "expect": "expand-m006-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm007", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Adds document expanded @type to object", + "purpose": "Expansion using @container: @type", + "input": "expand-m007-in.jsonld", + "expect": "expand-m007-out.jsonld", + "option": {"base": "http://example.org/", "processingMode": "json-ld-1.1"} + }, { + "@id": "#tm008", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "adding new term", + "purpose": "scoped context on @type", + "input": "expand-m008-in.jsonld", + "expect": "expand-m008-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm009", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "overriding a term", + "purpose": "scoped context on @type", + "input": "expand-m009-in.jsonld", + "expect": "expand-m009-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm010", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "alias of @type", + "purpose": "scoped context on @type", + "input": "expand-m010-in.jsonld", + "expect": "expand-m010-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm011", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "deep @context affects nested nodes", + "purpose": "scoped context on @type", + "input": "expand-m011-in.jsonld", + "expect": "expand-m011-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm012", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "scoped context layers on intemediate contexts", + "purpose": "scoped context on @type", + "input": "expand-m012-in.jsonld", + "expect": "expand-m012-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} + }, { + "@id": "#tm013", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "When type is in a type map", + "purpose": "scoped context on @type", + "input": "expand-m013-in.jsonld", + "expect": "expand-m013-out.jsonld", + "option": {"processingMode": "json-ld-1.1"} }, { "@id": "#tn001", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -641,7 +713,7 @@ }, { "@id": "#tn002", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands input using @nest", + "name": "Expands input using aliased @nest", "purpose": "Expansion using @nest", "input": "expand-n002-in.jsonld", "expect": "expand-n002-out.jsonld", @@ -649,7 +721,7 @@ }, { "@id": "#tn003", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands input using @nest", + "name": "Appends nested values when property at base and nested", "purpose": "Expansion using @nest", "input": "expand-n003-in.jsonld", "expect": "expand-n003-out.jsonld", @@ -657,7 +729,7 @@ }, { "@id": "#tn004", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands input using @nest", + "name": "Appends nested values from all @nest aliases in term order", "purpose": "Expansion using @nest", "input": "expand-n004-in.jsonld", "expect": "expand-n004-out.jsonld", @@ -665,7 +737,7 @@ }, { "@id": "#tn005", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands input using @nest", + "name": "Nested nested containers", "purpose": "Expansion using @nest", "input": "expand-n005-in.jsonld", "expect": "expand-n005-out.jsonld", @@ -673,7 +745,7 @@ }, { "@id": "#tn006", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands input using @nest", + "name": "Arrays of nested values", "purpose": "Expansion using @nest", "input": "expand-n006-in.jsonld", "expect": "expand-n006-out.jsonld", @@ -681,7 +753,7 @@ }, { "@id": "#tn007", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands input using @nest", + "name": "A nest of arrays", "purpose": "Expansion using @nest", "input": "expand-n007-in.jsonld", "expect": "expand-n007-out.jsonld",