W3C

Compaction

This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at compact-manifest.jsonld. The manifest vocabulary is described in the JSON-LD Test Vocabulary (JSON-LD, Turtle) and is based on the RDF Test Vocabulary.

The JSON-LD Test Suite is a set of tests that can be used to verify JSON-LD Processor conformance to the set of specifications that constitute JSON-LD. The goal of the suite is to provide an easy and comprehensive JSON-LD testing solution for developers creating JSON-LD Processors.

The JSON-LD Framing Specification maintains it's own test suite.

General instructions for running the JSON-LD Test suites

compact tests have input, expected and context documents.

The expected results can be compared using JSON-LD object comparison with the processor output. Additionally, if the ordered option is not set, result should be expanded and compared with the expanded expected document also using JSON-LD object comparison.

For NegativeEvaluationTests, the result is a string associated with the expected error code.

Unless processingMode is set explicitly in a test entry, processingMode is compatible with both json-ld-1.0 and json-ld-1.1.

Test results that include a context input presume that the context is provided locally, and not from the referenced location, thus the results will include the content of the context file, rather than a reference.

Developers are encouraged to make a local copy of the test suite (available on GitHub) and simulate the behavior of fetching test files remotely and setting HTTP headers as described in a particular test entry.

JSON-LD Object comparison

If algorithms are invoked with the ordered flag set to true, simple JSON Object comparison may be used, as the order of all arrays will be preserved (except for fromRdf, unless the input quads are also ordered). If ordered is false, then the following algorithm will ensure arrays other than values of @list are compared without regard to order.

JSON-LD Object comparison compares JSON objects, arrays, and values recursively for equality.

Note that some tests require re-expansion and comparison, as list values may exist as values of properties that have @container: @list and the comparison algorithm will not consider ordering significant.

Running tests

The top-level manifest references the specific test manifests, which in turn reference each test associated with a particular type of behavior. Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:

Contributing Tests

If you would like to contribute a new test or a fix to an existing test, please follow these steps:

  1. Notify the JSON-LD mailing list, public-json-ld-wg@w3.org, that you will be creating a new test or fix and the purpose of the change.
  2. Clone the git repository: git://github.com/w3c/json-ld-api.git
  3. Make your changes and submit them via github, or via a 'git format-patch' to the JSON-LD Working Group mailing list.

Distribution

Distributed under the W3C Test Suite License. To contribute to a W3C Test Suite, see the policies and contribution forms.

Disclaimer

UNDER THE EXCLUSIVE LICENSE, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

baseIri
https://w3c.github.io/json-ld-api/tests/

JSON-LD Compaction tests.

Test sequence:

Test t0001 drop free-floating nodes
id
#t0001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Unreferenced nodes not containing properties are dropped
input
compact/0001-in.jsonld
context
compact/0001-context.jsonld
expect
compact/0001-out.jsonld
Test t0002 basic
id
#t0002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Basic term and value compaction
input
compact/0002-in.jsonld
context
compact/0002-context.jsonld
expect
compact/0002-out.jsonld
Test t0003 drop null and unmapped properties
id
#t0003
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Properties mapped to null or which are never mapped are dropped
input
compact/0003-in.jsonld
context
compact/0003-context.jsonld
expect
compact/0003-out.jsonld
Test t0004 optimize @set, keep empty arrays
id
#t0004
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Containers mapped to @set keep empty arrays
input
compact/0004-in.jsonld
context
compact/0004-context.jsonld
expect
compact/0004-out.jsonld
Test t0005 @type and prefix compaction
id
#t0005
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact uses prefixes in @type
input
compact/0005-in.jsonld
context
compact/0005-context.jsonld
expect
compact/0005-out.jsonld
Test t0006 keep expanded object format if @type doesn't match
id
#t0006
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Values not matching a coerced @type remain in expanded form
input
compact/0006-in.jsonld
context
compact/0006-context.jsonld
expect
compact/0006-out.jsonld
Test t0007 add context
id
#t0007
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
External context is added to the compacted document
input
compact/0007-in.jsonld
context
compact/0007-context.jsonld
expect
compact/0007-out.jsonld
Test t0008 alias keywords
id
#t0008
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Aliases for keywords are used in compacted document
input
compact/0008-in.jsonld
context
compact/0008-context.jsonld
expect
compact/0008-out.jsonld
Test t0009 compact @id
id
#t0009
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Value with @id is compacted to string if property cast to @id
input
compact/0009-in.jsonld
context
compact/0009-context.jsonld
expect
compact/0009-out.jsonld
Test t0010 array to @graph
id
#t0010
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
An array of objects is serialized with @graph
input
compact/0010-in.jsonld
context
compact/0010-context.jsonld
expect
compact/0010-out.jsonld
Test t0011 compact date
id
#t0011
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Expanded value with type xsd:dateTime is represented as string with type coercion
input
compact/0011-in.jsonld
context
compact/0011-context.jsonld
expect
compact/0011-out.jsonld
Test t0012 native types
id
#t0012
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Native values are unmodified during compaction
input
compact/0012-in.jsonld
context
compact/0012-context.jsonld
expect
compact/0012-out.jsonld
Test t0013 @value with @language
id
#t0013
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Values with @language remain in expanded form by default
input
compact/0013-in.jsonld
context
compact/0013-context.jsonld
expect
compact/0013-out.jsonld
Test t0014 array to aliased @graph
id
#t0014
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Aliasing @graph uses alias in compacted document
input
compact/0014-in.jsonld
context
compact/0014-context.jsonld
expect
compact/0014-out.jsonld
Test t0015 best match compaction
id
#t0015
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Property with values of different types use most appropriate term when compacting
input
compact/0015-in.jsonld
context
compact/0015-context.jsonld
expect
compact/0015-out.jsonld
Test t0016 recursive named graphs
id
#t0016
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting a document with multiple embedded uses of @graph
input
compact/0016-in.jsonld
context
compact/0016-context.jsonld
expect
compact/0016-out.jsonld
Test t0017 A term mapping to null removes the mapping
id
#t0017
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Mapping a term to null causes the property and its values to be removed from the compacted document
input
compact/0017-in.jsonld
context
compact/0017-context.jsonld
expect
compact/0017-out.jsonld
Test t0018 best matching term for lists
id
#t0018
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Lists with values of different types use best term in compacted document
input
compact/0018-in.jsonld
context
compact/0018-context.jsonld
expect
compact/0018-out.jsonld
Test t0019 Keep duplicate values in @list and @set
id
#t0019
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Duplicate values in @list or @set are retained in compacted document
input
compact/0019-in.jsonld
context
compact/0019-context.jsonld
expect
compact/0019-out.jsonld
Test t0020 Compact @id that is a property IRI when @container is @list
id
#t0020
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
A term with @container: @list is also used as the value of an @id, if appropriate
input
compact/0020-in.jsonld
context
compact/0020-context.jsonld
expect
compact/0020-out.jsonld
Test t0021 Compact properties and types using @vocab
id
#t0021
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@vocab is used to create relative properties and types if no other term matches
input
compact/0021-in.jsonld
context
compact/0021-context.jsonld
expect
compact/0021-out.jsonld
Test t0022 @list compaction of nested properties
id
#t0022
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact nested properties using @list containers
input
compact/0022-in.jsonld
context
compact/0022-context.jsonld
expect
compact/0022-out.jsonld
Test t0023 prefer @vocab over compacted IRIs
id
#t0023
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@vocab takes precedence over prefixes - even if the result is longer
input
compact/0023-in.jsonld
context
compact/0023-context.jsonld
expect
compact/0023-out.jsonld
Test t0024 most specific term matching in @list.
id
#t0024
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
The most specific term that matches all of the elements in the list, taking into account the default language, must be selected.
input
compact/0024-in.jsonld
context
compact/0024-context.jsonld
expect
compact/0024-out.jsonld
Test t0025 Language maps
id
#t0025
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Multiple values with different languages use language maps if property has @container: @language
input
compact/0025-in.jsonld
context
compact/0025-context.jsonld
expect
compact/0025-out.jsonld
Test t0026 Language map term selection with complications
id
#t0026
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Test appropriate property use given language maps with @vocab, a default language, and a competing term
input
compact/0026-in.jsonld
context
compact/0026-context.jsonld
expect
compact/0026-out.jsonld
Test t0027 @container: @set with multiple values
id
#t0027
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Fall back to term with @set container if term with language map is defined
input
compact/0027-in.jsonld
context
compact/0027-context.jsonld
expect
compact/0027-out.jsonld
Test t0028 Alias keywords and use @vocab
id
#t0028
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Combination of keyword aliases and @vocab
input
compact/0028-in.jsonld
context
compact/0028-context.jsonld
expect
compact/0028-out.jsonld
Test t0029 Simple @index map
id
#t0029
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Output uses index mapping if term is defined with @container: @index
input
compact/0029-in.jsonld
context
compact/0029-context.jsonld
expect
compact/0029-out.jsonld
Test t0030 non-matching @container: @index
id
#t0030
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Preserve @index tags if not compacted to an index map
input
compact/0030-in.jsonld
context
compact/0030-context.jsonld
expect
compact/0030-out.jsonld
Test t0031 Compact @reverse
id
#t0031
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact traverses through @reverse
input
compact/0031-in.jsonld
context
compact/0031-context.jsonld
expect
compact/0031-out.jsonld
Test t0032 Compact keys in reverse-maps
id
#t0032
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact traverses through @reverse
input
compact/0032-in.jsonld
context
compact/0032-context.jsonld
expect
compact/0032-out.jsonld
Test t0033 Compact reverse-map to reverse property
id
#t0033
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
A reverse map is replaced with a matching property defined with @reverse
input
compact/0033-in.jsonld
context
compact/0033-context.jsonld
expect
compact/0033-out.jsonld
Test t0034 Skip property with @reverse if no match
id
#t0034
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Do not use reverse property if no other property matches as normal property
input
compact/0034-in.jsonld
context
compact/0034-context.jsonld
expect
compact/0034-out.jsonld
Test t0035 Compact @reverse node references using strings
id
#t0035
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact node references to strings for reverse properties using @type: @id
input
compact/0035-in.jsonld
context
compact/0035-context.jsonld
expect
compact/0035-out.jsonld
Test t0036 Compact reverse properties using index containers
id
#t0036
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact using both reverse properties and index containers
input
compact/0036-in.jsonld
context
compact/0036-context.jsonld
expect
compact/0036-out.jsonld
Test t0037 Compact keys in @reverse using @vocab
id
#t0037
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact keys in @reverse using @vocab
input
compact/0037-in.jsonld
context
compact/0037-context.jsonld
expect
compact/0037-out.jsonld
Test t0038 Index map round-tripping
id
#t0038
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Complex round-tripping use case from Drupal
input
compact/0038-in.jsonld
context
compact/0038-context.jsonld
expect
compact/0038-out.jsonld
Options
specVersion
json-ld-1.0
Test ta038 Index map round-tripping
id
#ta038
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Complex round-tripping use case from Drupal
input
compact/0038-in.jsonld
context
compact/0038-context.jsonld
expect
compact/0038a-out.jsonld
Options
specVersion
json-ld-1.1
Test t0039 @graph is array
id
#t0039
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Value of @graph is always an array
input
compact/0039-in.jsonld
context
compact/0039-context.jsonld
expect
compact/0039-out.jsonld
Test t0040 @list is array
id
#t0040
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure that value of @list is always an array
input
compact/0040-in.jsonld
context
compact/0040-context.jsonld
expect
compact/0040-out.jsonld
Test t0041 index rejects term having @list
id
#t0041
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
If an index is present, a term having an @list container is not selected
input
compact/0041-in.jsonld
context
compact/0041-context.jsonld
expect
compact/0041-out.jsonld
Test t0042 @list keyword aliasing
id
#t0042
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Make sure keyword aliasing works if a list can't be compacted
input
compact/0042-in.jsonld
context
compact/0042-context.jsonld
expect
compact/0042-out.jsonld
Test t0043 select term over @vocab
id
#t0043
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure that @vocab compaction isn't used if the result collides with a term
input
compact/0043-in.jsonld
context
compact/0043-context.jsonld
expect
compact/0043-out.jsonld
Test t0044 @type: @vocab in reverse-map
id
#t0044
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Prefer properties with @type: @vocab in reverse-maps if the value can be compacted to a term
input
compact/0044-in.jsonld
context
compact/0044-context.jsonld
expect
compact/0044-out.jsonld
Test t0045 @id value uses relative IRI, not term
id
#t0045
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Values of @id are transformed to relative IRIs, terms are ignored
input
compact/0045-in.jsonld
context
compact/0045-context.jsonld
expect
compact/0045-out.jsonld
Test t0046 multiple objects without @context use @graph
id
#t0046
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Wrap top-level array into @graph even if no context is passed
input
compact/0046-in.jsonld
context
compact/0046-context.jsonld
expect
compact/0046-out.jsonld
Test t0047 Round-trip relative URLs
id
#t0047
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Relative URLs remain relative after compaction
input
compact/0047-in.jsonld
context
compact/0047-context.jsonld
expect
compact/0047-out.jsonld
Test t0048 term with @language: null
id
#t0048
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Prefer terms with a language mapping set to null over terms without language-mapping for non-strings
input
compact/0048-in.jsonld
context
compact/0048-context.jsonld
expect
compact/0048-out.jsonld
Test t0049 Round tripping of lists that contain just IRIs
id
#t0049
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
List compaction without @container: @list still uses strings if @type: @id
input
compact/0049-in.jsonld
context
compact/0049-context.jsonld
expect
compact/0049-out.jsonld
Test t0050 Reverse properties require @type: @id to use string values
id
#t0050
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Node references in reverse properties are not compacted to strings without explicit type-coercion
input
compact/0050-in.jsonld
context
compact/0050-context.jsonld
expect
compact/0050-out.jsonld
Test t0051 Round tripping @list with scalar
id
#t0051
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Native values survive round-tripping with @list
input
compact/0051-in.jsonld
context
compact/0051-context.jsonld
expect
compact/0051-out.jsonld
Test t0052 Round tripping @list with scalar and @graph alias
id
#t0052
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Native values survive round-tripping with @list and @graph alias
input
compact/0052-in.jsonld
context
compact/0052-context.jsonld
expect
compact/0052-out.jsonld
Test t0053 Use @type: @vocab if no @type: @id
id
#t0053
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact to @type: @vocab when no @type: @id term available
input
compact/0053-in.jsonld
context
compact/0053-context.jsonld
expect
compact/0053-out.jsonld
Test t0054 Compact to @type: @vocab and compact @id to term
id
#t0054
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact to @type: @vocab and compact @id to term
input
compact/0054-in.jsonld
context
compact/0054-context.jsonld
expect
compact/0054-out.jsonld
Test t0055 Round tripping @type: @vocab
id
#t0055
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting IRI value of property with @type: @vocab can use term
input
compact/0055-in.jsonld
context
compact/0055-context.jsonld
expect
compact/0055-out.jsonld
Test t0056 Prefer @type: @vocab over @type: @id for terms
id
#t0056
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting IRI value of property with @type: @vocab can use term
input
compact/0056-in.jsonld
context
compact/0056-context.jsonld
expect
compact/0056-out.jsonld
Test t0057 Complex round tripping @type: @vocab and @type: @id
id
#t0057
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting IRI value of property with @type: @vocab can use term; more complex
input
compact/0057-in.jsonld
context
compact/0057-context.jsonld
expect
compact/0057-out.jsonld
Test t0058 Prefer @type: @id over @type: @vocab for non-terms
id
#t0058
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Choose a term having @type: @id over @type: @value if value is not a term
input
compact/0058-in.jsonld
context
compact/0058-context.jsonld
expect
compact/0058-out.jsonld
Test t0059 Term with @type: @vocab if no @type: @id
id
#t0059
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
If there's no term with @type: @id, use terms with @type: @vocab for IRIs not mapped to terms
input
compact/0059-in.jsonld
context
compact/0059-context.jsonld
expect
compact/0059-out.jsonld
Test t0060 Term with @type: @id if no @type: @vocab and term value
id
#t0060
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
If there's no term with @type: @vocab, use terms with @type: @id for IRIs mapped to terms
input
compact/0060-in.jsonld
context
compact/0060-context.jsonld
expect
compact/0060-out.jsonld
Test t0061 @type: @vocab/@id with values matching either
id
#t0061
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Separate IRIs for the same property to use term with more specific @type (@id vs. @vocab)
input
compact/0061-in.jsonld
context
compact/0061-context.jsonld
expect
compact/0061-out.jsonld
Test t0062 @type: @vocab and relative IRIs
id
#t0062
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Relative IRIs don't round-trip with @type: @vocab
input
compact/0062-in.jsonld
context
compact/0062-context.jsonld
expect
compact/0062-out.jsonld
Test t0063 Compact IRI round-tripping with @type: @vocab
id
#t0063
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Term with @type: @vocab will use compact IRIs
input
compact/0063-in.jsonld
context
compact/0063-context.jsonld
expect
compact/0063-out.jsonld
Test t0064 Compact language-tagged and indexed strings to index-map
id
#t0064
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Given values with both @index and @language and term index-map term, use index map
input
compact/0064-in.jsonld
context
compact/0064-context.jsonld
expect
compact/0064-out.jsonld
Test t0065 Language-tagged and indexed strings with language-map
id
#t0065
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Language-tagged and indexed strings don't compact to language-map
input
compact/0065-in.jsonld
context
compact/0065-context.jsonld
expect
compact/0065-out.jsonld
Test t0066 Relative IRIs
id
#t0066
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Complex use cases for relative IRI compaction
input
compact/0066-in.jsonld
context
compact/0066-context.jsonld
expect
compact/0066-out.jsonld
Test t0067 Reverse properties with blank nodes
id
#t0067
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact reverse property whose values are unlabeled blank nodes
input
compact/0067-in.jsonld
context
compact/0067-context.jsonld
expect
compact/0067-out.jsonld
Test t0068 Single value reverse properties
id
#t0068
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Single values of reverse properties are compacted as values of ordinary properties
input
compact/0068-in.jsonld
context
compact/0068-context.jsonld
expect
compact/0068-out.jsonld
Test t0069 Single value reverse properties with @set
id
#t0069
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Single values are kept in array form for reverse properties if the container is to @set
input
compact/0069-in.jsonld
context
compact/0069-context.jsonld
expect
compact/0069-out.jsonld
Test t0070 compactArrays option
id
#t0070
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Setting compactArrays to false causes single element arrays to be retained
input
compact/0070-in.jsonld
context
compact/0070-context.jsonld
expect
compact/0070-out.jsonld
Options
compactArrays
false
Test t0071 Input has multiple @contexts, output has one
id
#t0071
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Expanding input with multiple @contexts and compacting with just one doesn't output undefined properties
input
compact/0071-in.jsonld
context
compact/0071-context.jsonld
expect
compact/0071-out.jsonld
Test t0072 Default language and unmapped properties
id
#t0072
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure that the default language is handled correctly for unmapped properties
input
compact/0072-in.jsonld
context
compact/0072-context.jsonld
expect
compact/0072-out.jsonld
Test t0073 Mapped @id and @type
id
#t0073
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure that compaction works with mapped @id and @type
input
compact/0073-in.jsonld
context
compact/0073-context.jsonld
expect
compact/0073-out.jsonld
Test t0074 Container as a list with type of @id
id
#t0074
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure that compaction works for empty list when property has container declared as @list and type as @id
input
compact/0074-in.jsonld
context
compact/0074-context.jsonld
expect
compact/0074-out.jsonld
Test t0075 Compact using relative fragment identifier
id
#t0075
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting a relative round-trips
input
compact/0075-in.jsonld
context
compact/0075-context.jsonld
expect
compact/0075-out.jsonld
Options
processingMode
json-ld-1.0
base
http://example.org/
Test t0076 Compacting IRI equivalent to base
id
#t0076
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting IRI equivalent to base, uses last path segment of base ending in '/'
input
compact/0076-in.jsonld
context
compact/0076-context.jsonld
expect
compact/0076-out.jsonld
Test t0077 Compact a @graph container
id
#t0077
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a @graph container
input
compact/0077-in.jsonld
context
compact/0077-context.jsonld
expect
compact/0077-out.jsonld
Options
specVersion
json-ld-1.1
Test t0078 Compact a [@graph, @set] container
id
#t0078
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact with [@graph, @set]
input
compact/0078-in.jsonld
context
compact/0078-context.jsonld
expect
compact/0078-out.jsonld
Options
specVersion
json-ld-1.1
Test t0079 Compact a @graph container having @index
id
#t0079
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Verify that having both @graph and @index allows @graph container compaction
input
compact/0079-in.jsonld
context
compact/0079-context.jsonld
expect
compact/0079-out.jsonld
Options
specVersion
json-ld-1.1
Test t0080 Do not compact a graph having @id with a term having an @graph container
id
#t0080
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Graph compaction works only on simple graphs
input
compact/0080-in.jsonld
context
compact/0080-context.jsonld
expect
compact/0080-out.jsonld
Options
specVersion
json-ld-1.1
Test t0081 Compact a [@graph, @index] container
id
#t0081
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a @graph container with @index
input
compact/0081-in.jsonld
context
compact/0081-context.jsonld
expect
compact/0081-out.jsonld
Options
specVersion
json-ld-1.1
Test t0082 Compact a [@graph, @index, @set] container
id
#t0082
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a @graph container with @index and @set
input
compact/0082-in.jsonld
context
compact/0082-context.jsonld
expect
compact/0082-out.jsonld
Options
specVersion
json-ld-1.1
Test t0083 [@graph, @index] does not compact graph with @id
id
#t0083
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Graph compaction with @graph and @index works only on simple graphs
input
compact/0083-in.jsonld
context
compact/0083-context.jsonld
expect
compact/0083-out.jsonld
Options
specVersion
json-ld-1.1
Test t0084 Compact a simple graph with a [@graph, @id] container
id
#t0084
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a simple graph using a @graph container with @id
input
compact/0084-in.jsonld
context
compact/0084-context.jsonld
expect
compact/0084-out.jsonld
Options
specVersion
json-ld-1.1
Test t0085 Compact a named graph with a [@graph, @id] container
id
#t0085
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a named graph using a @graph container with @id
input
compact/0085-in.jsonld
context
compact/0085-context.jsonld
expect
compact/0085-out.jsonld
Options
specVersion
json-ld-1.1
Test t0086 Compact a simple graph with a [@graph, @id, @set] container
id
#t0086
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a simple graph using a @graph container with @id and @set
input
compact/0086-in.jsonld
context
compact/0086-context.jsonld
expect
compact/0086-out.jsonld
Options
specVersion
json-ld-1.1
Test t0087 Compact a named graph with a [@graph, @id, @set] container
id
#t0087
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a named graph using a @graph container with @id and @set
input
compact/0087-in.jsonld
context
compact/0087-context.jsonld
expect
compact/0087-out.jsonld
Options
specVersion
json-ld-1.1
Test t0088 Compact a graph with @index using a [@graph, @id] container
id
#t0088
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact a @graph container with @id and @set, discarding an @index value
input
compact/0088-in.jsonld
context
compact/0088-context.jsonld
expect
compact/0088-out.jsonld
Options
specVersion
json-ld-1.1
Test t0089 Language map term selection with complications
id
#t0089
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Test appropriate property use given language maps with @vocab, a default language, no language, and competing terms
input
compact/0089-in.jsonld
context
compact/0089-context.jsonld
expect
compact/0089-out.jsonld
Test t0090 Compact input with @graph container to output without @graph container
id
#t0090
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0090-in.jsonld
context
compact/0090-context.jsonld
expect
compact/0090-out.jsonld
Options
specVersion
json-ld-1.1
Test t0091 Compact input with @graph container to output without @graph container with compactArrays unset
id
#t0091
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output with compactArrays unset
input
compact/0091-in.jsonld
context
compact/0091-context.jsonld
expect
compact/0091-out.jsonld
Options
compactArrays
false
specVersion
json-ld-1.1
Test t0092 Compact input with [@graph, @set] container to output without [@graph, @set] container
id
#t0092
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0092-in.jsonld
context
compact/0092-context.jsonld
expect
compact/0092-out.jsonld
Options
specVersion
json-ld-1.1
Test t0093 Compact input with [@graph, @set] container to output without [@graph, @set] container with compactArrays unset
id
#t0093
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output with compactArrays unset
input
compact/0093-in.jsonld
context
compact/0093-context.jsonld
expect
compact/0093-out.jsonld
Options
compactArrays
false
specVersion
json-ld-1.1
Test t0094 Compact input with [@graph, @set] container to output without [@graph, @set] container
id
#t0094
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0094-in.jsonld
context
compact/0094-context.jsonld
expect
compact/0094-out.jsonld
Options
specVersion
json-ld-1.1
Test t0095 Relative propererty IRIs with @vocab: ''
id
#t0095
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Complex use cases for relative IRI compaction or properties
input
compact/0095-in.jsonld
context
compact/0095-context.jsonld
expect
compact/0095-out.jsonld
Test t0096 Compact @graph container (multiple graphs)
id
#t0096
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0096-in.jsonld
context
compact/0096-context.jsonld
expect
compact/0096-out.jsonld
Options
specVersion
json-ld-1.1
Test t0097 Compact [@graph, @set] container (multiple graphs)
id
#t0097
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0097-in.jsonld
context
compact/0097-context.jsonld
expect
compact/0097-out.jsonld
Options
specVersion
json-ld-1.1
Test t0098 Compact [@graph, @index] container (multiple indexed objects)
id
#t0098
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0098-in.jsonld
context
compact/0098-context.jsonld
expect
compact/0098-out.jsonld
Options
specVersion
json-ld-1.1
Test t0099 Compact [@graph, @index, @set] container (multiple indexed objects)
id
#t0099
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0099-in.jsonld
context
compact/0099-context.jsonld
expect
compact/0099-out.jsonld
Options
specVersion
json-ld-1.1
Test t0100 Compact [@graph, @id] container (multiple indexed objects)
id
#t0100
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0100-in.jsonld
context
compact/0100-context.jsonld
expect
compact/0100-out.jsonld
Options
specVersion
json-ld-1.1
Test t0101 Compact [@graph, @id, @set] container (multiple indexed objects)
id
#t0101
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0101-in.jsonld
context
compact/0101-context.jsonld
expect
compact/0101-out.jsonld
Options
specVersion
json-ld-1.1
Test t0102 Compact [@graph, @index] container (multiple indexes and objects)
id
#t0102
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0102-in.jsonld
context
compact/0102-context.jsonld
expect
compact/0102-out.jsonld
Options
specVersion
json-ld-1.1
Test t0103 Compact [@graph, @id] container (multiple ids and objects)
id
#t0103
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensure @graph appears properly in output
input
compact/0103-in.jsonld
context
compact/0103-context.jsonld
expect
compact/0103-out.jsonld
Options
specVersion
json-ld-1.1
Test t0104 Compact @type with @container: @set
id
#t0104
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensures that a single @type value is represented as an array
input
compact/0104-in.jsonld
context
compact/0104-context.jsonld
expect
compact/0104-out.jsonld
Options
specVersion
json-ld-1.1
Test t0105 Compact @type with @container: @set using an alias of @type
id
#t0105
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensures that a single @type value is represented as an array
input
compact/0105-in.jsonld
context
compact/0105-context.jsonld
expect
compact/0105-out.jsonld
Options
specVersion
json-ld-1.1
Test t0106 Do not compact @type with @container: @set to an array using an alias of @type
id
#t0106
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Ensures that a single @type value is not represented as an array in 1.0
input
compact/0106-in.jsonld
context
compact/0106-context.jsonld
expect
compact/0106-out.jsonld
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test t0107 Relative propererty IRIs with @vocab: ''
id
#t0107
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Complex use cases for relative IRI compaction or properties
input
compact/0107-in.jsonld
context
compact/0107-context.jsonld
expect
compact/0107-out.jsonld
Test t0108 context with JavaScript Object property names
id
#t0108
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact with context including JavaScript Object property names
input
compact/0108-in.jsonld
context
compact/0108-context.jsonld
expect
compact/0108-out.jsonld
Test t0109 Compact @graph container (multiple objects)
id
#t0109
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Multiple objects in a simple graph with a graph container need to use @included
input
compact/0109-in.jsonld
context
compact/0109-context.jsonld
expect
compact/0109-out.jsonld
Options
specVersion
json-ld-1.1
Test t0110 Compact [@graph, @set] container (multiple objects)
id
#t0110
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Multiple objects in a simple graph with a graph container need to use @included
input
compact/0110-in.jsonld
context
compact/0110-context.jsonld
expect
compact/0110-out.jsonld
Options
specVersion
json-ld-1.1
Test tc001 adding new term
id
#tc001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using a scoped context uses term scope for selecting proper term
input
compact/c001-in.jsonld
context
compact/c001-context.jsonld
expect
compact/c001-out.jsonld
Options
specVersion
json-ld-1.1
Test tc002 overriding a term
id
#tc002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using a scoped context uses term scope for selecting proper term
input
compact/c002-in.jsonld
context
compact/c002-context.jsonld
expect
compact/c002-out.jsonld
Options
specVersion
json-ld-1.1
Test tc003 property and value with different terms mapping to the same expanded property
id
#tc003
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using a scoped context uses term scope for selecting proper term
input
compact/c003-in.jsonld
context
compact/c003-context.jsonld
expect
compact/c003-out.jsonld
Options
specVersion
json-ld-1.1
Test tc004 deep @context affects nested nodes
id
#tc004
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using a scoped context uses term scope for selecting proper term
input
compact/c004-in.jsonld
context
compact/c004-context.jsonld
expect
compact/c004-out.jsonld
Options
specVersion
json-ld-1.1
Test tc005 scoped context layers on intemediate contexts
id
#tc005
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using a scoped context uses term scope for selecting proper term
input
compact/c005-in.jsonld
context
compact/c005-context.jsonld
expect
compact/c005-out.jsonld
Options
specVersion
json-ld-1.1
Test tc006 adding new term
id
#tc006
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c006-in.jsonld
context
compact/c006-context.jsonld
expect
compact/c006-out.jsonld
Options
specVersion
json-ld-1.1
Test tc007 overriding a term
id
#tc007
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c007-in.jsonld
context
compact/c007-context.jsonld
expect
compact/c007-out.jsonld
Options
specVersion
json-ld-1.1
Test tc008 alias of @type
id
#tc008
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c008-in.jsonld
context
compact/c008-context.jsonld
expect
compact/c008-out.jsonld
Options
specVersion
json-ld-1.1
Test tc009 deep @type-scoped @context does NOT affect nested nodes
id
#tc009
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c009-in.jsonld
context
compact/c009-context.jsonld
expect
compact/c009-out.jsonld
Options
specVersion
json-ld-1.1
Test tc010 scoped context layers on intemediate contexts
id
#tc010
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c010-in.jsonld
context
compact/c010-context.jsonld
expect
compact/c010-out.jsonld
Options
specVersion
json-ld-1.1
Test tc011 applies context for all values
id
#tc011
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c011-in.jsonld
context
compact/c011-context.jsonld
expect
compact/c011-out.jsonld
Options
specVersion
json-ld-1.1
Test tc012 orders @type terms when applying scoped contexts
id
#tc012
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c012-in.jsonld
context
compact/c012-context.jsonld
expect
compact/c012-out.jsonld
Options
specVersion
json-ld-1.1
Test tc013 deep property-term scoped @context in @type-scoped @context affects nested nodes
id
#tc013
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/c013-in.jsonld
context
compact/c013-context.jsonld
expect
compact/c013-out.jsonld
Options
specVersion
json-ld-1.1
Test tc014 type-scoped context nullification
id
#tc014
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped context nullification
input
compact/c014-in.jsonld
context
compact/c014-context.jsonld
expect
compact/c014-out.jsonld
Options
specVersion
json-ld-1.1
Test tc015 type-scoped base
id
#tc015
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped base
input
compact/c015-in.jsonld
context
compact/c015-context.jsonld
expect
compact/c015-out.jsonld
Options
specVersion
json-ld-1.1
Test tc016 type-scoped vocab
id
#tc016
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped vocab
input
compact/c016-in.jsonld
context
compact/c016-context.jsonld
expect
compact/c016-out.jsonld
Options
specVersion
json-ld-1.1
Test tc017 multiple type-scoped contexts are properly reverted
id
#tc017
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
multiple type-scoped contexts are property reverted
input
compact/c017-in.jsonld
context
compact/c017-context.jsonld
expect
compact/c017-out.jsonld
Options
specVersion
json-ld-1.1
Test tc018 multiple type-scoped types resolved against previous context
id
#tc018
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
multiple type-scoped types resolved against previous context
input
compact/c018-in.jsonld
context
compact/c018-context.jsonld
expect
compact/c018-out.jsonld
Options
specVersion
json-ld-1.1
Test tc019 type-scoped context with multiple property scoped terms
id
#tc019
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped context with multiple property scoped terms
input
compact/c019-in.jsonld
context
compact/c019-context.jsonld
expect
compact/c019-out.jsonld
Options
specVersion
json-ld-1.1
Test tc020 type-scoped value
id
#tc020
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped value
input
compact/c020-in.jsonld
context
compact/c020-context.jsonld
expect
compact/c020-out.jsonld
Options
specVersion
json-ld-1.1
Test tc021 type-scoped value mix
id
#tc021
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped value mix
input
compact/c021-in.jsonld
context
compact/c021-context.jsonld
expect
compact/c021-out.jsonld
Options
specVersion
json-ld-1.1
Test tc022 type-scoped property-scoped contexts including @type:@vocab
id
#tc022
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped property-scoped contexts including @type:@vocab
input
compact/c022-in.jsonld
context
compact/c022-context.jsonld
expect
compact/c022-out.jsonld
Options
specVersion
json-ld-1.1
Test tc023 composed type-scoped property-scoped contexts including @type:@vocab
id
#tc023
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
composed type-scoped property-scoped contexts including @type:@vocab
input
compact/c023-in.jsonld
context
compact/c023-context.jsonld
expect
compact/c023-out.jsonld
Options
specVersion
json-ld-1.1
Test tc024 type-scoped + property-scoped + values evaluates against previous context
id
#tc024
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped + property-scoped + values evaluates against previous context
input
compact/c024-in.jsonld
context
compact/c024-context.jsonld
expect
compact/c024-out.jsonld
Options
specVersion
json-ld-1.1
Test tc025 type-scoped + graph container
id
#tc025
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped + graph container
input
compact/c025-in.jsonld
context
compact/c025-context.jsonld
expect
compact/c025-out.jsonld
Options
specVersion
json-ld-1.1
Test tc026 @propagate: true on type-scoped context
id
#tc026
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
type-scoped context with @propagate: true survive node-objects
input
compact/c026-in.jsonld
context
compact/c026-context.jsonld
expect
compact/c026-out.jsonld
Options
specVersion
json-ld-1.1
Test tc027 @propagate: false on property-scoped context
id
#tc027
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
property-scoped context with @propagate: false do not survive node-objects
input
compact/c027-in.jsonld
context
compact/c027-context.jsonld
expect
compact/c027-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi01 term direction null
id
#tdi01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Uses term with null direction when two terms conflict on direction.
input
compact/di01-in.jsonld
context
compact/di01-context.jsonld
expect
compact/di01-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi02 use alias of @direction
id
#tdi02
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Use alias of @direction.
input
compact/di02-in.jsonld
context
compact/di02-context.jsonld
expect
compact/di02-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi03 term selection with lists and direction
id
#tdi03
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Term selection includes values of @list.
input
compact/di03-in.jsonld
context
compact/di03-context.jsonld
expect
compact/di03-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi04 simple language map with term direction
id
#tdi04
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Term selection with language maps and @direction.
input
compact/di04-in.jsonld
context
compact/di04-context.jsonld
expect
compact/di04-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi05 simple language map with overriding term direction
id
#tdi05
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Term selection with language maps and @direction.
input
compact/di05-in.jsonld
context
compact/di05-context.jsonld
expect
compact/di05-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi06 simple language map with overriding null direction
id
#tdi06
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Term selection with language maps and @direction.
input
compact/di06-in.jsonld
context
compact/di06-context.jsonld
expect
compact/di06-out.jsonld
Options
specVersion
json-ld-1.1
Test tdi07 simple language map with mismatching term direction
id
#tdi07
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Term selection with language maps and @direction.
input
compact/di07-in.jsonld
context
compact/di07-context.jsonld
expect
compact/di07-out.jsonld
Options
specVersion
json-ld-1.1
Test te001 Compaction to list of lists
id
#te001
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
Verifies that an exception is raised in Compaction when attempting to compact a list of lists
input
compact/e001-in.jsonld
context
compact/e001-context.jsonld
expect
compaction to list of lists
Options
specVersion
json-ld-1.0
Test te002 Absolute IRI confused with Compact IRI
id
#te002
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
Verifies that IRI compaction detects when the result is an absolute IRI with a scheme matching a term.
input
compact/e002-in.jsonld
context
compact/e002-context.jsonld
expect
IRI confused with prefix
Options
specVersion
json-ld-1.1
Test ten01 Nest term not defined
id
#ten01
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
Transparent Nesting
input
compact/en01-in.jsonld
context
compact/en01-context.jsonld
expect
invalid @nest value
Options
specVersion
json-ld-1.1
Test tep05 processingMode json-ld-1.0 conflicts with @version: 1.1
id
#tep05
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.
input
compact/ep05-in.jsonld
context
compact/ep05-context.jsonld
expect
processing mode conflict
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep06 @version must be 1.1
id
#tep06
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
If @version is specified, it must be 1.1
input
compact/ep06-in.jsonld
context
compact/ep06-context.jsonld
expect
invalid @version value
Options
specVersion
json-ld-1.1
Test tep07 @prefix is not allowed in 1.0
id
#tep07
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
@prefix is not allowed in a term definition 1.0
input
compact/ep07-in.jsonld
context
compact/ep07-context.jsonld
expect
invalid term definition
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep08 @prefix must be a boolean
id
#tep08
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
@prefix must be a boolean in a term definition in 1.1
input
compact/ep08-in.jsonld
context
compact/ep08-context.jsonld
expect
invalid @prefix value
Options
specVersion
json-ld-1.1
Test tep09 @prefix not allowed on compact IRI term
id
#tep09
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
If processingMode is json-ld-1.0, or if term contains a colon (:), an invalid term definition has been detected and processing is aborted.
input
compact/ep09-in.jsonld
context
compact/ep09-context.jsonld
expect
invalid term definition
Options
specVersion
json-ld-1.1
Test tep10 @nest is not allowed in 1.0
id
#tep10
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
@nest is not allowed in a term definitionin 1.0
input
compact/ep10-in.jsonld
context
compact/ep10-context.jsonld
expect
invalid term definition
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep11 @context is not allowed in 1.0
id
#tep11
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
@context is not allowed in a term definitionin 1.0
input
compact/ep11-in.jsonld
context
compact/ep11-context.jsonld
expect
invalid term definition
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep12 @container may not be an array in 1.0
id
#tep12
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
validate appropriate values of @container
input
compact/ep12-in.jsonld
context
compact/ep12-context.jsonld
expect
invalid container mapping
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep13 @container may not be @id in 1.0
id
#tep13
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
validate appropriate values of @container
input
compact/ep13-in.jsonld
context
compact/ep13-context.jsonld
expect
invalid container mapping
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep14 @container may not be @type in 1.0
id
#tep14
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
validate appropriate values of @container
input
compact/ep14-in.jsonld
context
compact/ep14-context.jsonld
expect
invalid container mapping
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tep15 @container may not be @graph in 1.0
id
#tep15
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
validate appropriate values of @container
input
compact/ep15-in.jsonld
context
compact/ep15-context.jsonld
expect
invalid container mapping
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tin01 Basic Included array
id
#tin01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests included maps.
input
compact/in01-in.jsonld
context
compact/in01-context.jsonld
expect
compact/in01-out.jsonld
Options
specVersion
json-ld-1.1
Test tin02 Basic Included object
id
#tin02
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests included maps.
input
compact/in02-in.jsonld
context
compact/in02-context.jsonld
expect
compact/in02-out.jsonld
Options
specVersion
json-ld-1.1
Test tin03 Multiple properties mapping to @included are folded together
id
#tin03
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests included maps.
input
compact/in03-in.jsonld
context
compact/in03-context.jsonld
expect
compact/in03-out.jsonld
Options
specVersion
json-ld-1.1
Test tin04 Included containing @included
id
#tin04
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests included maps.
input
compact/in04-in.jsonld
context
compact/in04-context.jsonld
expect
compact/in04-out.jsonld
Options
specVersion
json-ld-1.1
Test tin05 Property value with @included
id
#tin05
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests included maps.
input
compact/in05-in.jsonld
context
compact/in05-context.jsonld
expect
compact/in05-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs01 Compact JSON literal (boolean true)
id
#tjs01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (boolean true).
input
compact/js01-in.jsonld
context
compact/js01-context.jsonld
expect
compact/js01-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs02 Compact JSON literal (boolean false)
id
#tjs02
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (boolean false).
input
compact/js02-in.jsonld
context
compact/js02-context.jsonld
expect
compact/js02-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs03 Compact JSON literal (double)
id
#tjs03
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (double).
input
compact/js03-in.jsonld
context
compact/js03-context.jsonld
expect
compact/js03-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs04 Compact JSON literal (double-zero)
id
#tjs04
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (double-zero).
input
compact/js04-in.jsonld
context
compact/js04-context.jsonld
expect
compact/js04-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs05 Compact JSON literal (integer)
id
#tjs05
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (integer).
input
compact/js05-in.jsonld
context
compact/js05-context.jsonld
expect
compact/js05-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs06 Compact JSON literal (object)
id
#tjs06
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (object).
input
compact/js06-in.jsonld
context
compact/js06-context.jsonld
expect
compact/js06-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs07 Compact JSON literal (array)
id
#tjs07
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (array).
input
compact/js07-in.jsonld
context
compact/js07-context.jsonld
expect
compact/js07-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs08 Compact already expanded JSON literal
id
#tjs08
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting JSON literal does not expand terms inside json.
input
compact/js08-in.jsonld
context
compact/js08-context.jsonld
expect
compact/js08-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs09 Compact already expanded JSON literal with aliased keys
id
#tjs09
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting JSON literal in expanded form.
input
compact/js09-in.jsonld
context
compact/js09-context.jsonld
expect
compact/js09-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs10 Compact JSON literal (string)
id
#tjs10
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (string).
input
compact/js10-in.jsonld
context
compact/js10-context.jsonld
expect
compact/js10-out.jsonld
Options
specVersion
json-ld-1.1
Test tjs11 Compact JSON literal (null)
id
#tjs11
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Tests compacting property with @type @json to a JSON literal (null).
input
compact/js11-in.jsonld
context
compact/js11-context.jsonld
expect
compact/js11-out.jsonld
Options
specVersion
json-ld-1.1
Test tla01 most specific term matching in @list.
id
#tla01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
The most specific term that matches all of the elements in the list, taking into account the default language, must be selected, without considering case of language.
input
compact/la01-in.jsonld
context
compact/la01-context.jsonld
expect
compact/la01-out.jsonld
Test tli01 coerced @list containing an empty list
id
#tli01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Lists of Lists
input
compact/li01-in.jsonld
context
compact/li01-context.jsonld
expect
compact/li01-out.jsonld
Options
specVersion
json-ld-1.1
Test tli02 coerced @list containing a list
id
#tli02
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Lists of Lists
input
compact/li02-in.jsonld
context
compact/li02-context.jsonld
expect
compact/li02-out.jsonld
Options
specVersion
json-ld-1.1
Test tli03 coerced @list containing an deep list
id
#tli03
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Lists of Lists
input
compact/li03-in.jsonld
context
compact/li03-context.jsonld
expect
compact/li03-out.jsonld
Options
specVersion
json-ld-1.1
Test tli04 coerced @list containing multiple lists
id
#tli04
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Lists of Lists
input
compact/li04-in.jsonld
context
compact/li04-context.jsonld
expect
compact/li04-out.jsonld
Options
specVersion
json-ld-1.1
Test tli05 coerced @list containing mixed list values
id
#tli05
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Lists of Lists
input
compact/li05-in.jsonld
context
compact/li05-context.jsonld
expect
compact/li05-out.jsonld
Options
specVersion
json-ld-1.1
Test tm001 Indexes to object not having an @id
id
#tm001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @container: @id
input
compact/m001-in.jsonld
context
compact/m001-context.jsonld
expect
compact/m001-out.jsonld
Options
specVersion
json-ld-1.1
Test tm002 Indexes to object already having an @id
id
#tm002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @container: @id
input
compact/m002-in.jsonld
context
compact/m002-context.jsonld
expect
compact/m002-out.jsonld
Options
specVersion
json-ld-1.1
Test tm003 Indexes to object not having an @type
id
#tm003
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @container: @type
input
compact/m003-in.jsonld
context
compact/m003-context.jsonld
expect
compact/m003-out.jsonld
Options
specVersion
json-ld-1.1
Test tm004 Indexes to object already having an @type
id
#tm004
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @container: @type
input
compact/m004-in.jsonld
context
compact/m004-context.jsonld
expect
compact/m004-out.jsonld
Options
specVersion
json-ld-1.1
Test tm005 Indexes to object using compact IRI @id
id
#tm005
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @container: @id
input
compact/m005-in.jsonld
context
compact/m005-context.jsonld
expect
compact/m005-out.jsonld
Options
specVersion
json-ld-1.1
Test tm006 Indexes using compacted @type
id
#tm006
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @container: @type
input
compact/m006-in.jsonld
context
compact/m006-context.jsonld
expect
compact/m006-out.jsonld
Options
specVersion
json-ld-1.1
Test tm007 When type is in a type map
id
#tm007
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
scoped context on @type
input
compact/m007-in.jsonld
context
compact/m007-context.jsonld
expect
compact/m007-out.jsonld
Options
specVersion
json-ld-1.1
Test tm008 @index map with @none node definition
id
#tm008
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @index
input
compact/m008-in.jsonld
context
compact/m008-context.jsonld
expect
compact/m008-out.jsonld
Options
specVersion
json-ld-1.1
Test tm009 @index map with @none value
id
#tm009
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @index
input
compact/m009-in.jsonld
context
compact/m009-context.jsonld
expect
compact/m009-out.jsonld
Options
specVersion
json-ld-1.1
Test tm010 @index map with @none value using alias of @none
id
#tm010
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @index
input
compact/m010-in.jsonld
context
compact/m010-context.jsonld
expect
compact/m010-out.jsonld
Options
specVersion
json-ld-1.1
Test tm011 @language map with no @language
id
#tm011
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @language
input
compact/m011-in.jsonld
context
compact/m011-context.jsonld
expect
compact/m011-out.jsonld
Options
specVersion
json-ld-1.1
Test tm012 language map with no @language using alias of @none
id
#tm012
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @language
input
compact/m012-in.jsonld
context
compact/m012-context.jsonld
expect
compact/m012-out.jsonld
Options
specVersion
json-ld-1.1
Test tm013 id map using @none
id
#tm013
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @id
input
compact/m013-in.jsonld
context
compact/m013-context.jsonld
expect
compact/m013-out.jsonld
Options
specVersion
json-ld-1.1
Test tm014 id map using @none with alias
id
#tm014
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @id
input
compact/m014-in.jsonld
context
compact/m014-context.jsonld
expect
compact/m014-out.jsonld
Options
specVersion
json-ld-1.1
Test tm015 type map using @none with alias
id
#tm015
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @type
input
compact/m015-in.jsonld
context
compact/m015-context.jsonld
expect
compact/m015-out.jsonld
Options
specVersion
json-ld-1.1
Test tm016 type map using @none with alias
id
#tm016
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @type
input
compact/m016-in.jsonld
context
compact/m016-context.jsonld
expect
compact/m016-out.jsonld
Options
specVersion
json-ld-1.1
Test tm017 graph index map using @none
id
#tm017
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @graph and @index
input
compact/m017-in.jsonld
context
compact/m017-context.jsonld
expect
compact/m017-out.jsonld
Options
specVersion
json-ld-1.1
Test tm018 graph id map using @none
id
#tm018
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @graph and @id
input
compact/m018-in.jsonld
context
compact/m018-context.jsonld
expect
compact/m018-out.jsonld
Options
specVersion
json-ld-1.1
Test tm019 graph id map using alias of @none
id
#tm019
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @graph and @id
input
compact/m019-in.jsonld
context
compact/m019-context.jsonld
expect
compact/m019-out.jsonld
Options
specVersion
json-ld-1.1
Test tm020 node reference compacts to string value of type map
id
#tm020
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @type
input
compact/m020-in.jsonld
context
compact/m020-context.jsonld
expect
compact/m020-out.jsonld
Options
specVersion
json-ld-1.1
Test tm021 node reference compacts to string value of type map with @type: @id
id
#tm021
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @type
input
compact/m021-in.jsonld
context
compact/m021-context.jsonld
expect
compact/m021-out.jsonld
Options
specVersion
json-ld-1.1
Test tm022 node reference compacts to string value of type map with @type: @vocab
id
#tm022
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
index on @type
input
compact/m022-in.jsonld
context
compact/m022-context.jsonld
expect
compact/m022-out.jsonld
Options
specVersion
json-ld-1.1
Test tn001 Indexes to @nest for property with @nest
id
#tn001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n001-in.jsonld
context
compact/n001-context.jsonld
expect
compact/n001-out.jsonld
Options
specVersion
json-ld-1.1
Test tn002 Indexes to @nest for all properties with @nest
id
#tn002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n002-in.jsonld
context
compact/n002-context.jsonld
expect
compact/n002-out.jsonld
Options
specVersion
json-ld-1.1
Test tn003 Nests using alias of @nest
id
#tn003
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n003-in.jsonld
context
compact/n003-context.jsonld
expect
compact/n003-out.jsonld
Options
specVersion
json-ld-1.1
Test tn004 Arrays of nested values
id
#tn004
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n004-in.jsonld
context
compact/n004-context.jsonld
expect
compact/n004-out.jsonld
Options
specVersion
json-ld-1.1
Test tn005 Nested @container: @list
id
#tn005
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n005-in.jsonld
context
compact/n005-context.jsonld
expect
compact/n005-out.jsonld
Options
specVersion
json-ld-1.1
Test tn006 Nested @container: @index
id
#tn006
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n006-in.jsonld
context
compact/n006-context.jsonld
expect
compact/n006-out.jsonld
Options
specVersion
json-ld-1.1
Test tn007 Nested @container: @language
id
#tn007
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n007-in.jsonld
context
compact/n007-context.jsonld
expect
compact/n007-out.jsonld
Options
specVersion
json-ld-1.1
Test tn008 Nested @container: @type
id
#tn008
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n008-in.jsonld
context
compact/n008-context.jsonld
expect
compact/n008-out.jsonld
Options
specVersion
json-ld-1.1
Test tn009 Nested @container: @id
id
#tn009
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n009-in.jsonld
context
compact/n009-context.jsonld
expect
compact/n009-out.jsonld
Options
specVersion
json-ld-1.1
Test tn010 Multiple nest aliases
id
#tn010
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compaction using @nest
input
compact/n010-in.jsonld
context
compact/n010-context.jsonld
expect
compact/n010-out.jsonld
Options
specVersion
json-ld-1.1
Test tp001 Compact IRI will not use an expanded term definition in 1.0
id
#tp001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Terms with an expanded term definition are not used for creating compact IRIs
input
compact/p001-in.jsonld
context
compact/p001-context.jsonld
expect
compact/p001-out.jsonld
Options
processingMode
json-ld-1.0
specVersion
json-ld-1.1
Test tp002 Compact IRI does not use expanded term definition in 1.1
id
#tp002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Terms with an expanded term definition are not used for creating compact IRIs
input
compact/p002-in.jsonld
context
compact/p002-context.jsonld
expect
compact/p002-out.jsonld
Options
specVersion
json-ld-1.1
Test tp003 Compact IRI does not use simple term that does not end with a gen-delim
id
#tp003
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Terms not ending with a gen-delim are not used for creating compact IRIs
input
compact/p003-in.jsonld
context
compact/p003-context.jsonld
expect
compact/p003-out.jsonld
Options
specVersion
json-ld-1.1
Test tp004 Compact IRIs using simple terms ending with gen-delim
id
#tp004
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
All simple terms ending with gen-delim are suitable for compaction
input
compact/p004-in.jsonld
context
compact/p004-context.jsonld
expect
compact/p004-out.jsonld
Options
specVersion
json-ld-1.1
Test tp005 Compact IRI uses term with definition including @prefix: true
id
#tp005
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Expanded term definition may set prefix explicitly in 1.1
input
compact/p005-in.jsonld
context
compact/p005-context.jsonld
expect
compact/p005-out.jsonld
Options
specVersion
json-ld-1.1
Test tp006 Compact IRI uses term with definition including @prefix: true
id
#tp006
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Expanded term definition may set prefix explicitly in 1.1
input
compact/p006-in.jsonld
context
compact/p006-context.jsonld
expect
compact/p006-out.jsonld
Options
specVersion
json-ld-1.1
Test tp007 Compact IRI not used as prefix
id
#tp007
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Terms including a colon are excluded from being used as a prefix
input
compact/p007-in.jsonld
context
compact/p007-context.jsonld
expect
compact/p007-out.jsonld
Options
specVersion
json-ld-1.1
Test tp008 Compact IRI does not use term with definition including @prefix: false
id
#tp008
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Expanded term definition may set prefix explicitly in 1.1
input
compact/p008-in.jsonld
context
compact/p008-context.jsonld
expect
compact/p008-out.jsonld
Options
specVersion
json-ld-1.1
Test tpi01 property-valued index indexes property value, instead of property (value)
id
#tpi01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting property-valued indexes.
input
compact/pi01-in.jsonld
context
compact/pi01-context.jsonld
expect
compact/pi01-out.jsonld
Options
specVersion
json-ld-1.1
Test tpi02 property-valued index indexes property value, instead of property (multiple values)
id
#tpi02
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting property-valued indexes.
input
compact/pi02-in.jsonld
context
compact/pi02-context.jsonld
expect
compact/pi02-out.jsonld
Options
specVersion
json-ld-1.1
Test tpi03 property-valued index indexes property value, instead of property (node)
id
#tpi03
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting property-valued indexes.
input
compact/pi03-in.jsonld
context
compact/pi03-context.jsonld
expect
compact/pi03-out.jsonld
Options
specVersion
json-ld-1.1
Test tpi04 property-valued index indexes property value, instead of property (multiple nodes)
id
#tpi04
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting property-valued indexes.
input
compact/pi04-in.jsonld
context
compact/pi04-context.jsonld
expect
compact/pi04-out.jsonld
Options
specVersion
json-ld-1.1
Test tpi05 property-valued index indexes using @none if no property value exists
id
#tpi05
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting property-valued indexes.
input
compact/pi05-in.jsonld
context
compact/pi05-context.jsonld
expect
compact/pi05-out.jsonld
Options
specVersion
json-ld-1.1
Test tpi06 property-valued index indexes using @none if no property value does not compact to string
id
#tpi06
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compacting property-valued indexes.
input
compact/pi06-in.jsonld
context
compact/pi06-context.jsonld
expect
compact/pi06-out.jsonld
Options
specVersion
json-ld-1.1
Test tpr01 Check illegal clearing of context with protected terms
id
#tpr01
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
Check error when clearing a context with protected terms.
input
compact/pr01-in.jsonld
context
compact/pr01-context.jsonld
expect
invalid context nullification
Options
specVersion
json-ld-1.1
Test tpr02 Check illegal overriding of protected term
id
#tpr02
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
Check error when overriding a protected term.
input
compact/pr02-in.jsonld
context
compact/pr02-context.jsonld
expect
protected term redefinition
Options
specVersion
json-ld-1.1
Test tpr03 Check illegal overriding of protected term from type-scoped context
id
#tpr03
Type
jld:NegativeEvaluationTest, jld:CompactTest
Purpose
Check error when overriding a protected term from type-scoped context.
input
compact/pr03-in.jsonld
context
compact/pr03-context.jsonld
expect
protected term redefinition
Options
specVersion
json-ld-1.1
Test tpr04 Check legal overriding of protected term from property-scoped context
id
#tpr04
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Check overriding a protected term from property-scoped context.
input
compact/pr04-in.jsonld
context
compact/pr04-context.jsonld
expect
compact/pr04-out.jsonld
Options
specVersion
json-ld-1.1
Test tpr05 Check legal overriding of type-scoped protected term from nested node
id
#tpr05
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Check legal overriding of type-scoped protected term from nested node.
input
compact/pr05-in.jsonld
context
compact/pr05-context.jsonld
expect
compact/pr05-out.jsonld
Options
specVersion
json-ld-1.1
Test tr001 Expands and compacts to document base by default
id
#tr001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
Compact IRI attempts to compact document-relative IRIs
input
compact/r001-in.jsonld
context
compact/r001-context.jsonld
expect
compact/r001-out.jsonld
Options
base
http://example.org/
specVersion
json-ld-1.1
Test tr002 Expands and does not compact to document base with compactToRelative false
id
#tr002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
With compactToRelative option set to false, IRIs which could be made relative to the document base are not made relative.
input
compact/r002-in.jsonld
context
compact/r002-context.jsonld
expect
compact/r002-out.jsonld
Options
specVersion
json-ld-1.1
compactToRelative
false
Test ts001 @context with single array values
id
#ts001
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@context values may be in an array
input
compact/s001-in.jsonld
context
compact/s001-context.jsonld
expect
compact/s001-out.jsonld
Options
specVersion
json-ld-1.1
Test ts002 @context with array including @set uses array values
id
#ts002
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@context values may include @set along with another compatible value
input
compact/s002-in.jsonld
context
compact/s002-context.jsonld
expect
compact/s002-out.jsonld
Options
specVersion
json-ld-1.1
Test ttn01 @type: @none does not compact values
id
#ttn01
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@type: @none does not compact values.
input
compact/tn01-in.jsonld
context
compact/tn01-context.jsonld
expect
compact/tn01-out.jsonld
Options
specVersion
json-ld-1.1
Test ttn02 @type: @none does not use arrays by default
id
#ttn02
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@type: @none honors @container.
input
compact/tn02-in.jsonld
context
compact/tn02-context.jsonld
expect
compact/tn02-out.jsonld
Options
specVersion
json-ld-1.1
Test ttn03 @type: @none uses arrays with @container: @set
id
#ttn03
Type
jld:PositiveEvaluationTest, jld:CompactTest
Purpose
@type: @none honors @container.
input
compact/tn03-in.jsonld
context
compact/tn03-context.jsonld
expect
compact/tn03-out.jsonld
Options
specVersion
json-ld-1.1