EarlReport generates HTML+RDFa rollups of multiple EARL reports
Guile implementation of the JsonLD API defined by the W3C.
RDF.rb extension for parsing/serializing JSON-LD data.
Flattening drops unreferenced nodes having only @id
Flattening terms with different types of values
Verifies that null values and unmapped properties are removed from expanded output
Uses of @set are removed in expansion; values of @set, or just plain values which are empty arrays are retained
If a keyword is aliased, it is not used when flattening
Aliased keywords expand in resulting document
Expand strings to expanded value with @type: xsd:dateTime
Keep expanded values with @language, drop non-conforming value objects containing just @language
Use of @graph to contain multiple nodes within array
Flattening native scalar retains native scalar within expanded value
A value of a property with @type: @id coercion expands to a node reference
Flattening objects containing chained objects flattens all objects
Flattening an expanded/flattened document maintains input document
An array of multiple @set nodes are collapsed into a single array
Setting @context to null within an embedded object resets back to initial context state
override default @language in terms; only language-tag strings
Flattening a value of null removes the value
do not remove @graph if not at top-level
do not remove @graph at top-level if not only property
@graph used at the top level is retained if there are other properties
Flattening with a default language applies that language to string values
Flattening lists and sets with properties having coercion coerces list/set values
Tests that contexts in an array are merged
Flattening different kinds of terms and Compact IRIs
Duplicate values in @list and @set are not merged
Use @vocab in properties and @type but not in @id
@vocab is used to compact properties and @type, but is not used for @id
Language Maps expand values to include @language
Flattening native types with type coercion adds the coerced type to an expanded value representation and retains the native value representation
Mapping a term to null decouples it from @vocab
Verifies that terms can be defined using @vocab
Multiple properties expanding to the same IRI
Verifies multiple values from separate terms are deterministically made multiple values of the IRI associated with the terms
Language maps with @vocab, default language, and colliding property
Flattening index maps for terms defined with @container: @index
language and index expansion on non-objects
Only invoke language and index map expansion if the value is a JSON object
Free-floating values in sets are removed, free-floating lists are removed completely
Lists objects are implicit unlabeled blank nodes and thus never equivalent
Setting compactArrays to false causes single element arrays to be retained
Proper (re-)labeling of blank nodes if used with reverse properties.
Usage of empty strings in identifiers needs special care when constructing the node map.
Flatten using relative fragment identifier properly joins to base
Node definitions contained within lists are flattend to top level.
context with JavaScript Object property names
Flatten with context including JavaScript Object property names
Verifies that an exception is raised in Flattening when conflicting indexes are found
Multiple properties mapping to @included are folded together
These tests implement the requirements for the JSON-LD [Flattening Algorithm](https://www.w3.org/TR/json-ld11-api/#flattening-algorithm).
Basic example used in playgrond and spec examples.
If property is not in frame, and explicit is true, do not add any values for property to output.
Unless the explicit is false, processors append extra values to output.
If property is a keyword, processors add property and objects to output.
Various cases showing array output for @container: @set, and non-embedding of node values if @embed: false.
Processors MUST skip property and property frame if property frame contains @omitDefault with a value of true. Processors MUST add property to output with a new dictionary having a property @preserve and a value that is a copy of the value of @default in frame if it exists, or the string @null otherwise.
@embed within a frame controls the object embed flag when processing that frame (true and false values) in json-ld-1.0 mode.
Multiple values for @type in frame match different nodes having one or the other type. With @embed false, nodes are serialized as multiple array values of @graph.
An empty frame matches all objects, even if embedded, causing them to be serialized under @graph.
An embedded node which matches the top-level frame (on @type) is framed under @graph and continues to be embedded. Other nodes continue to be embedded.
Match if node has a @type property and frame has a @type property containing only an empty dictionary.
Framing flattens expanded input, allowing for deeply embedded input to be re-framed.
Set framing context to the value of @context from frame, if it exists, or to a new empty context, otherwise.
Resources can be re-embedded again in each top-level frame match
@type matching matches nodes at top-level, and embedding causes them be embedded where referenced.
Empty frame matches all nodes at top-level, and repeats where embedded in json-ld-1.0 mode.
Empty frame matches all nodes at top-level, and repeats where embedded (with list content) in json-ld-1.0 mode.
Match if node and frame both have the same @id property.
No match if node has a property where frame has an empty array for that same property.
match on any common properties if @requireAll: false
Match if @requireAll is false and both node and frame contain common non-keyword properties of any value.
@requireAll with missing values and @default
Match if @requireAll is true and frame contains a non-keyword key not present in node, where the value is a JSON object containing only the key @default with any value.
explicitly excludes unframed properties (@explicit: true)
If property is not in frame, and explicit is true, processors must not add any values for property to output.
non-existent framed properties create null property
Recursively, replace all key-value pairs in compacted results where the key is @preserve with the value from the key-pair. If the value from the key-pair is @null, replace the value with null.
If frame has the property @reverse, then for each reverse property and sub frame that are the values of @reverse in frame.
embed matched frames with reversed property
@embed within a frame controls the object embed flag when processing that frame (@always and @never values).
Do not match objects with @type, if frame uses @type: [].
Match on a specific node with frame uses @id.
Match on a specific node with frame uses @id with an array of IRIs.
Match/reject properties using both wildcard and match none.
Node patterns that don't match all levels, don't match top level.
Value objects matching value patterns are output, others are filtered.
matches wildcard @value in value pattern
matches wildcard @language in value pattern
matches match none @type in value pattern
matches match none @language in value pattern
excludes non-matched values in value pattern
Unless @graph exists at the top level, framing uses merged node objects in json-ld-1.0 mode.
Frame default graph if outer @graph is used
If @graph exists at the top level, framing uses the default graph.
@graph used within a property value frames embedded values from a named graph.
Merge one graph and deep preserve another
@graph used within a property value frames embedded values from a named graph in json-ld-1.0 mode.
When compacting the value of a property using @preserve, use the term definition for term to properly compact the value of @preserve.
@id must not include a blank node identifier
Node matching does not consider blank nodes.
@type must not include a blank node identifier
Any other value for @embed is invalid and indicates that an invalid @embed value error has been detected and processing is aborted.
Frame matching on matching value in list
Frame matching on any matching value in list
Frame matching with no matching value in list
@embed: @last replaces previous embed values with node reference
Verify that within a matched node, by default only the last reference will be embedded in json-ld-1.0 mode.
@embed: @once only embeds first value with node reference
Verify that within a matched node and @embed: @first, by only the first reference will be embedded.
Verify that embedded nodes match with @default and a wildcard @id.
An array with a single value remains an array if container is @set.
Cleaning up @preserve/@null does not violate container: @set.
@null may be used as an @default value and is preserved in output.
When merging nodes, ensure that @type values from each node are retained.
@embed within a frame controls the object embed flag when processing that frame (true and false values).
Library framing example with @graph and omitGraph is true.
Basic example used in playground and spec examples.
Embed with indirect circular reference via set
Embed with nested indirect circular reference via set
Recursive property embed w/o circular reference
Empty frame matches all nodes at top-level, and repeats where embedded.
Empty frame matches all nodes at top-level, and repeats where embedded (with list content).
Merge graphs if no outer @graph is used (prune bnodes)
Unless @graph exists at the top level, framing uses merged node objects.
Merge one graph and deep preserve another (prune bnodes)
If @id is aliased in a frame, an unreferenced blank node is still pruned.
@requireAll only matches if @type and other properties are present
If @requireAll is true, then all listed properties, including @type, must be present to match.
@requireAll only matches if @id and @type match
If @requireAll is true, then all listed properties, including @id and @type, must be present to match.
These tests implement the requirements for the JSON-LD [Framing Algorithm](https://www.w3.org/TR/json-ld11-framing/#framing-algorithm).
Tests generation of a triple using full URIs and a plain literal.
Plain literal with CURIE from default context
Tests generation of a triple using a CURIE defined in the default context.
Tests that a BNode is created if no explicit subject is set.
Tests that a plain literal is created with a language tag.
Tests that a literal may be created using extended characters.
Tests creation of a literal with a datatype.
Tests 'a' generates rdf:type and object is implicit IRI
Verify that 'a' is an alias for rdf:type, and the object is created as an IRI.
Generate an IRI using a prefix defined within an @context.
A property referencing an associative array gets object from subject of array.
Test object processing defines object with implicit BNode
If no @ is specified, a BNode is created, and will be used as the object of an enclosing property.
Tests that Multiple Objects are for a Single Property using array syntax.
Tests that @list: [] generates an empty list.
Creation of a list with multiple elements
Expanding an empty IRI uses the test file location.
Relative IRI expands relative resource location
Expanding a relative IRI uses the test file location.
Frag ID expands relative resource location
Expanding a fragment uses the test file location.
Tests coercion of object to anyURI when specified.
Tests coercion of object to a typed literal when specified.
Tests that a decimal value generates a xsd:double typed literal;.
Tests that a decimal value generates a xsd:integer typed literal.
Tests that a decimal value generates a xsd:boolean typed literal.
Tests that an array with a single element on a property with @list coercion creates an RDF Collection.
Tests that @type with an array of types creates multiple types.
Using @graph with other keys places triples in a named graph.
Tests that named graphs containing named graphs flatten to single level of graph naming.
top-level graph with string subject reference
Tests graphs containing subject references as strings.
Tests that generated triples do not depend on order of @context.
Tests that generated triples do not depend on order of @id.
Tests that generated triples do not depend on order of properties inside @context.
non-fractional numbers converted to xsd:double
xsd:double's canonical lexical is used when converting numbers without fraction that are coerced to xsd:double
The toRDF algorithm does not relabel blank nodes; it reuses the counter from the nodeMapGeneration to generate new ones
Basic use of creating a named graph using an IRI name
Basic use of creating a named graph using a BNode name
Dataset with a default and two named graphs
Dataset with a default and two named graphs (IRI and BNode)
Dataset from node with embedded named graph
Embedding @graph in a node creates a named graph
Dataset from node with embedded named graph (bnode)
Embedding @graph in a node creates a named graph. Graph name is created if there is no subject
Verifies that @vocab defined as a compact IRI expands properly
Verifies that @vocab defined as a term expands properly
Expansion using a scoped context uses term scope for selecting proper term
property and value with different terms mapping to the same expanded property
scoped context layers on intemediate contexts
deep @type-scoped @context does NOT affect nested nodes
orders @type terms when applying scoped contexts
deep property-term scoped @context in @type-scoped @context affects nested nodes
type maps use scoped context from type index and not scoped context from containing
multiple type-scoped contexts are properly reverted
multiple type-scoped contexts are property reverted
multiple type-scoped types resolved against previous context
type-scoped context with multiple property scoped terms
type-scoped property-scoped contexts including @type:@vocab
composed type-scoped property-scoped contexts including @type:@vocab
type-scoped + property-scoped + values evaluates against previous context
type-scoped context with @propagate: true survive node-objects
@propagate: false on property-scoped context
property-scoped context with @propagate: false do not survive node-objects
embedded context with @propagate: false do not survive node-objects
@context resolutions respects relative URLs.
An embedded context which is never used should still be checked.
Unused context with an embedded context error.
An unused context with an embedded context should still be checked.
Scoped contexts may be externally loaded.
Terms should make use of @vocab relative to the scope in which the term was defined.
Expansion with empty property-scoped context.
Adding a minimal/empty property-scoped context should not affect expansion of terms defined in the outer scope.
Expand string using default and term directions
Strings are coerced to have @direction based on default and term direction.
Expand string using default and term directions and languages
List values where the term has @direction are used in expansion.
Term selection with language maps and @direction.
simple language mapwith overriding term direction
simple language mapwith overriding null direction
simple language map with mismatching term direction
Generate an error if @direction has illegal value.
rdfDirection: i18n-datatype with direction and no language
Generates i18n datatype from literal with direction with option.
rdfDirection: i18n-datatype with direction and language
rdfDirection: compound-literal with direction and no language
rdfDirection: compound-literal with direction and language
Generates compound literal from literal with direction with option.
Free-floating nodes do not generate RDF triples (from expand-0001)
Properties mapped to null or which are never mapped are dropped (from expand-0003)
Type-coerced dates generate typed literals (from expand-0007)
Native types generate typed literals (from expand-0010)
Embedded @graph without @id creates BNode-labeled named graph (from expand-0020)
Lists and sets of properties with list/set coercion
Using reverse properties inside a @reverse-container
Remove free-floating set values and lists
Using strings as value of a reverse property
Term definitions with prefix separate from prefix definitions
Expansion of keyword aliases in term definitions
@vocab-relative IRIs in term definitions
Expand @vocab-relative term with @type: @vocab
Use terms with @type: @vocab but not with @type: @id
Overwrite document base with @base and reset it again
Coercing native types to arbitrary datatypes
Expand a reverse property with an index-container
Expand reverse property whose values are unlabeled blank nodes
Keys that are not mapped to an IRI in a reverse-map are dropped
Use @vocab to expand keys in reverse-maps
Objects are unordered, so serialized node definition containing @context may have @context at the end of the node definition
Objects are unordered, so serialized node definition containing @id may have @id at the end of the node definition
Use @vocab to map all properties to blank node identifiers
Use of the base option overrides the document location
Use of the expandContext option to expand the input document
Creates an @graph container if value is a graph
Don't double-expand an already expanded graph
Use of @graph containers with @index and @set
Do not expand [@graph, @index] container if value is a graph
Does not create a new graph object if indexed value is already a graph object
Use of @graph containers with @id and @set
Do not expand [@graph, @id] container if value is a graph
Value Expansion does not expand native values, such as booleans, to a node object
Use of an empty @base is applied to the base option
relative @base overrides base option and document location
Use of a relative @base overrides base option and document location
relative and absolute @base overrides base option and document location
Use of a relative and absolute @base overrides base option and document location
Various relative IRIs as properties with with @vocab: ''
expand @graph container (multiple objects)
expand [@graph, @set] container (multiple objects)
Creates an @graph container if value is a graph (multiple objects)
expand [@graph, @index] container (multiple indexed objects)
expand [@graph, @index, @set] container (multiple objects)
Do not expand [@graph, @index] container if value is a graph (multiple objects)
expand [@graph, @id] container (multiple objects)
expand [@graph, @id, @set] container (multiple objects)
Do not expand [@graph, @id] container if value is a graph (multiple objects)
Expand @graph container if value is a graph (multiple objects)
Expand @graph container if value is a graph (multiple graphs)
Creates an @graph container if value is a graph (mixed graph and object)
Do not expand [@graph, @index] container if value is a graph (mixed graph and object)
Do not expand [@graph, @id] container if value is a graph (mixed graph and object)
expand [@graph, @index] container (indexes with multiple objects)
expand [@graph, @id] container (multiple ids and objects)
IRI expansion of fragments including ':'
Do not treat as absolute IRIs values that look like compact IRIs if they're not absolute
Various relative IRIs as properties with with relative @vocab
Various relative IRIs as properties with with relative @vocab itself relative to an existing vocabulary base
Various relative IRIs as properties with with relative @vocab relative to another relative vocabulary base
Expand with context including JavaScript Object property names
Expansion allows multiple properties expanding to @type
An exception for the colliding keywords error is made for @type
A term starting with a colon can expand to a different IRI
Terms may begin with a colon and not be treated as IRIs.
Expanding a value staring with a colon does not treat that value as an IRI
Processors SHOULD generate a warning and MUST ignore terms having the form of a keyword.
Ignore some values of @id with @, allow others.
Processors SHOULD generate a warning and MUST ignore values of @id having the form of a keyword.
Ignore some values of @reverse with @, allow others.
Processors SHOULD generate a warning and MUST ignore values of @reverse having the form of a keyword.
Ignore some IRIs when that start with @ when expanding.
Processors SHOULD generate a warning and MUST ignore IRIs having the form of a keyword.
Value objects including invalid literal datatype IRIs are rejected
A scoped context may include itself recursively (direct)
Verifies that no exception is raised on expansion when processing a scoped context referencing itself directly
A scoped context may include itself recursively (indirect)
Verifies that no exception is raised on expansion when processing a scoped context referencing itself indirectly
Two scoped context may include a shared context
Verifies that no exception is raised on expansion when processing two scoped contexts referencing a shared context
Base without trailing slash, without path
Verify URI resolution relative to base (without trailing slash, without path) according to RFC 3986
Verify URI resolution relative to base (without trailing slash, with path) according to RFC 3986
Verifies that an exception is raised on expansion when a invalid term definition is found
Verifies that an exception is raised if @type is defined as a term with an empty map
Verifies that an exception is raised on expansion when a invalid container mapping is found
@nest MUST NOT have a value object value
does not allow a keyword other than @nest for the value of @nest
processingMode json-ld-1.0 conflicts with @version: 1.1
If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.
If @version is specified, it must be 1.1
Keywords cannot be aliased to other keywords
Verifies that an exception is raised on expansion when processing an invalid context aliasing a keyword to another keyword
Verifies that an exception is raised on expansion when a context dereference results in an error
Verifies that an exception is raised on expansion when a remote context is not an object containing @context
Verifies that an exception is raised on expansion when a context is not a string or object
Verifies that an exception is raised on expansion when a context contains an invalid @base
Verifies that an exception is raised on expansion when a context contains an invalid @vocab mapping
Verifies that an exception is raised on expansion when a context contains an invalid @language
Verifies that an exception is raised on expansion when a cyclic IRI mapping is found
Verifies that an exception is raised on expansion when a invalid type mapping is found
Verifies that an exception is raised on expansion when a invalid reverse property is found
Invalid IRI mapping (@reverse not a string)
Verifies that an exception is raised on expansion when a invalid IRI mapping is found
Invalid reverse property (invalid @container)
Verifies that an exception is raised on expansion when a invalid keyword alias is found
Verifies that an exception is raised on expansion when a invalid language mapping is found
Invalid IRI mapping (relative IRI in @type)
Verifies that an exception is raised in Expansion when a invalid reverse property map is found
Verifies that an exception is raised in Expansion when colliding keywords are found
Verifies that an exception is raised in Expansion when an invalid @id value is found
Verifies that an exception is raised in Expansion when an invalid type value is found
Verifies that an exception is raised in Expansion when an invalid value object value is found
Verifies that an exception is raised in Expansion when an invalid language-tagged string value is found
Verifies that an exception is raised in Expansion when an invalid @index value value is found
Verifies that an exception is raised in Expansion when an invalid @reverse value is found
Invalid reverse property value (in @reverse)
Verifies that an exception is raised in Expansion when an invalid reverse property value is found
Verifies that an exception is raised in Expansion when an invalid language map value is found
Invalid reverse property value (through coercion)
Invalid value object (unexpected keyword)
Verifies that an exception is raised in Expansion when an invalid value object is found
Invalid value object (@type and @language)
Verifies that an exception is raised in Expansion when an invalid language-tagged value is found
Verifies that an exception is raised in Expansion when an invalid typed value is found
Verifies that an exception is raised in Expansion when an invalid set or list object is found
Verifies that an exception is raised on expansion when processing an invalid context attempting to define @container on a keyword
Expanding term mapping to @type uses @type syntax now illegal
Redefine terms looking like compact IRIs
Term definitions may look like compact IRIs, but must be consistent.
Verifies that a relative IRI cannot be used as a term.
A relative IRI cannot be used as a prefix
Verifies that an exception is raised in Expansion when an invalid IRI is used for @reverse.
Invalid value object value using a value alias
Verifies that an exception is raised in Expansion when an invalid value object value is found using a value alias
Verifies that an exception is raised on expansion when a context contains a definition for the empty term
Verifies that an exception is raised on expansion when a context contains an invalid @prefix value
Invalid value object, multiple values for @type.
The value of @type in a value object MUST be a string or null.
Invalid term definition, multiple values for @type.
The value of @type in an expanded term definition object MUST be a string or null.
Error if @included value is a value object
Error if @included value is a list object
Tests transforming property with @type @json to a JSON literal (boolean true).
Tests transforming property with @type @json to a JSON literal (boolean false).
Tests transforming property with @type @json to a JSON literal (double).
Tests transforming property with @type @json to a JSON literal (double-zero).
Tests transforming property with @type @json to a JSON literal (integer).
Tests transforming property with @type @json to a JSON literal (object).
Tests transforming property with @type @json to a JSON literal (array).
Transform JSON literal with array canonicalization
Tests transforming JSON literal with array canonicalization.
Transform JSON literal with string canonicalization
Tests transforming JSON literal with string canonicalization.
Transform JSON literal with structural canonicalization
Tests transforming JSON literal with structural canonicalization.
Transform JSON literal with unicode canonicalization
Tests transforming JSON literal with unicode canonicalization.
Transform JSON literal with value canonicalization
Tests transforming JSON literal with value canonicalization.
Transform JSON literal with wierd canonicalization
Tests transforming JSON literal with wierd canonicalization.
Transform JSON literal without expanding contents
Tests transforming JSON literal does not expand terms inside json.
Transform JSON literal aleady in expanded form
Tests transforming JSON literal in expanded form.
Transform JSON literal aleady in expanded form with aliased keys
Tests transforming JSON literal in expanded form with aliased keys in value object.
Tests transforming property with @type @json to a JSON literal (string).
Tests transforming property with @type @json to a JSON literal (null).
Transform JSON literal with aliased @type
Tests transforming JSON literal with aliased @type.
Transform JSON literal with aliased @value
Tests transforming JSON literal with aliased @value.
Tests transforming JSON literal with a @context.
Transform JSON literal (null) aleady in expanded form.
Tests transforming property with @type @json to a JSON literal (empty array).
@list containing empty @list (with coercion)
coerced @list containing deep empty arrays
coerced @list containing mixed list values
Tests list elements expanded to IRIs with a good @base.
Tests list elements expanded to IRIs with a bad @base.
Tests list elements expanded to IRIs with an empty @base.
Tests list elements expanded to IRIs with a null @base.
Retains @id in object already having an @id
Adds @type to object not having an @type
Prepends @type in object already having an @type
Adds vocabulary expanded @type to object
string value of type map expands to node reference
string value of type map expands to node reference with @type: @id
string value of type map expands to node reference with @type: @vocab
string value of type map must not be a literal
Appends nested values when property at base and nested
Appends nested values from all @nest aliases in term order
Multiple keys may mapping to @type when nesting
literal_ascii_boundaries '\x00\x26\x28...' from N-Triples
literal_with_UTF8_boundaries '\x80\x7ff\x800\xfff...' from N-Triples
literal_all_controls '\x00\x01\x02\x03\x04...' from N-Triples
literal_all_punctuation '!"#$%&()...' from N-Triples
literal with squote "x'y" from N-Triples
literal with 2 squotes "x''y" from N-Triples
literal with dquote "x"y" from N-Triples
literal with 2 dquotes """a""b""" from N-Triples
REVERSE SOLIDUS at end of literal from N-Triples
literal with CHARACTER TABULATION from N-Triples
literal with CARRIAGE RETURN from N-Triples
literal with REVERSE SOLIDUS from N-Triples
literal with numeric escape4 \u from N-Triples
@version may be specified after first context
If processing mode is not set through API, it is set by the first context containing @version.
error if @version is json-ld-1.0 for property-valued index
Expanding index maps where index is a property.
error if @container does not include @index for property-valued index
error if @index is a keyword for property-valued index
error if @index is not a string for property-valued index
error if attempting to add property to value object for property-valued index
property-valued index expands to property value, instead of @index (value)
property-valued index appends to property value, instead of @index (value)
property-valued index expands to property value, instead of @index (node)
property-valued index appends to property value, instead of @index (node)
property-valued index does not output property for @none
property-valued index adds property to graph object
Check error when overriding a protected term.
A term with @protected: false is not protected.
A protected context protects all term definitions.
Do not protect term with @protected: false
A protected context does not protect terms with @protected: false.
Clear active context with protected terms from an embedded context
The Active context be set to null from an embedded context.
Clear active context of protected terms from a term.
The Active context may be set to null from a scoped context of a term.
Attempt to redefine term in other protected context.
A protected term cannot redefine another protected term.
Scoped context fail to override protected term.
Clear protection with array with null context
Fail to override protected terms with type.
Fail to override protected terms with type+null+ctx.
Fail with mix of protected and unprotected terms with type+null+ctx.
Fail with mix of protected and unprotected terms with type+null.
Check legal overriding of type-scoped protected term from nested node.
Allows redefinition of protected alias term with same definition.
Allows redefinition of protected prefix term with same definition.
Allows redefinition of terms with scoped contexts using same definitions.
Fails on redefinition of terms with scoped contexts using different definitions.
Allows redefinition of protected alias term with same definition modulo protected flag.
Fails if trying to redefine a protected null term.
A protected term with a null IRI mapping cannot be redefined.
Does not expand a Compact IRI using a non-prefix term.
Expansion of Compact IRIs considers if the term can be used as a prefix.
Keywords may not be redefined other than to protect them.
Protected keyword aliases cannot be overridden.
Fails if trying to declare a keyword alias as prefix.
Keyword aliases can not be used as prefixes.
Ignores a non-keyword term starting with '@'
Terms in the form of a keyword, which are not keywords, are ignored.
Ignores a non-keyword term starting with '@' (with @vocab)
Ignores a term mapping to a value in the form of a keyword.
Ignores a term mapping to a value in the form of a keyword (with @vocab).
Ignores a term mapping to a value in the form of a keyword (@reverse).
Ignores a term mapping to a value in the form of a keyword (@reverse with @vocab).
Protected terms and property-scoped contexts
Check overriding of protected term from property-scoped context.
numbers with no fractions but that are >= 1e21 are represented as xsd:double
Processors must detect source contexts that include @import.
@propagate: true on type-scoped context with @import
type-scoped context with @propagate: true survive node-objects (with @import)
@propagate: false on property-scoped context with @import
property-scoped context with @propagate: false do not survive node-objects (with @import)
Override term defined in sourced context
The containing context is merged into the source context.
Override @vocab defined in sourced context
Override protected terms in sourced context
@import may not be used in an imported context.
@import only valid within a term definition.
@import can only reference a single context
@type: @none expands strings as value objects
@type: @none leaves inputs other than strings alone
Triples including invalid subject IRIs are rejected
ToRdf emits only well-formed statements.
Triples including invalid predicate IRIs are rejected
Triples including invalid object IRIs are rejected
Triples including invalid type IRIs are rejected
Triples including invalid language tags are rejected
Triples including invalid graph name IRIs are rejected
These tests implement the requirements for the JSON-LD [Deserialize JSON-LD to RDF Algorithm](https://www.w3.org/TR/json-ld11-api/#deserialize-json-ld-to-rdf-algorithm).
Expands embedded JSON-LD script element (xhtml)
Expands first embedded JSON-LD script element
Tests embedded JSON-LD in HTML with fragment identifier
Expands all embedded JSON-LD script elements with extractAllScripts option
Tests embedded JSON-LD in HTML extracting all elements
Expands multiple embedded JSON-LD script elements where one is an array
Tests embedded JSON-LD in HTML extracting all elements with array
Expands as empty with no embedded JSON-LD script elements
Tests embedded JSON-LD in HTML when none exist
Expands as empty with no embedded JSON-LD script elements and extractAllScripts
Tests embedded JSON-LD in HTML when none exist extracting all elements
Expands embedded JSON-LD script element with HTML character references
Tests embedded JSON-LD in HTML with character references
Tests embedded JSON-LD in HTML with fragment identifier that doesn't exist
Errors if targeted element is not a script element
Tests embedded JSON-LD in HTML which isn't a script element
Errors if targeted element does not have type application/ld+json
Tests embedded JSON-LD in HTML with wrong type
Errors if uncommented script text contains comment
Tests embedded JSON-LD in HTML with comments leftover
Tests embedded JSON-LD in HTML with unballanced comments
Errors if uncommented script is not valid JSON
Tests embedded JSON-LD in HTML which is invalid JSON
Expands embedded JSON-LD script element relative to document base
Expands embedded JSON-LD script element relative to base option
Expands embedded JSON-LD script element relative to HTML base
Expands embedded JSON-LD script element relative to relative HTML base
Expands targeted JSON-LD script element with fragment and HTML base
Compacts embedded JSON-LD script element
Compacts first embedded JSON-LD script element
Compacts targeted JSON-LD script element
Compacts all embedded JSON-LD script elements with extractAllScripts option
Flattens embedded JSON-LD script element
Flattens first embedded JSON-LD script element
Flattens targeted JSON-LD script element
Tests embedded JSON-LD in HTML multiple script elements
Transforms embedded JSON-LD script element
Transforms first embedded JSON-LD script element
Transforms targeted JSON-LD script element
These tests implement the requirements for the JSON-LD [HTML Content Algorithms](https://www.w3.org/TR/json-ld11-api/#html-content-algorithms).
Tests generation using different types of objects.
Do not use native datatypes for xsd:boolean, xsd:integer, and xsd:double by default.
BNode name generation and references between resources.
Multiple lists with different types of element.
Two graphs having same subject but different values
Ensure that properties and list elements aren't confused between graphs.
Preserve IRI list nodes (i.e., not blank nodes) when converting to @list
Do not convert lists that are not terminated by rdf:nil to @list.
If additional properties are associated to a list node, the list is only partially converted to @list.
Detect lists containing cycles and do not convert them to @list.
List pattern with multiple values of rdf:first
Do not convert list nodes to @list if nodes contain more than one value for rdf:first.
List pattern with multiple values of rdf:rest
Do not convert list nodes to @list if nodes contain more than one value for rdf:rest.
Do not convert lists to @list if a list node's rdf:rest is an IRI.
List nodes may have a rdf:type rdf:List.
Literals with datatype xsd:boolean, xsd:integer, and xsd:double are serialized using native scalar values
Setting useRdfType to true causes an rdf:type predicate to be treated like a normal property, not @type
An otherwise conformant list with a node shared across different lists does not serialize using @list
list with node shared across graphs (same triple in different graphs)
If a list node is used in different graphs, it isn't removed and converted to @list
Duplicate triples for a list node will not prevent @list from being properly generated
multiple languages for same subject+property+value
Uniqness of triples should include the value language
multiple types for same subject+property+value
Uniqness of triples should include the value type
triple with rdf:first property and rdf:nil value
Check list generation with rdf:first property and rdf:nil value.
rdfDirection: null with i18n literal with direction and no language
Does not parse i18n datatype without proper option.
rdfDirection: null with i18n literal with direction and language
rdfDirection: null with compound literal with direction and no language
Does not parse compound literal without proper option.
rdfDirection: null with compound literal with direction and language
rdfDirection: i18n-datatype with i18n literal with direction and no language
Parses i18n datatype with proper option.
rdfDirection: i18n-datatype with i18n literal with direction and language
rdfDirection: i18n-datatype with compound literal with direction and no language
rdfDirection: i18n-datatype with compound literal with direction and language
rdfDirection: compound-literal with i18n literal with direction and no language
rdfDirection: compound-literal with i18n literal with direction and language
rdfDirection: compound-literal with compound literal with direction and no language
Parses compound literal with proper option.
rdfDirection: compound-literal with compound literal with direction and language
Tests creating property with rdf:type rdf:JSON to a JSON literal (boolean true).
Tests creating property with rdf:type rdf:JSON to a JSON literal (boolean false).
Tests creating property with rdf:type rdf:JSON to a JSON literal (double).
Tests creating property with rdf:type rdf:JSON to a JSON literal (double-zero).
Tests creating property with rdf:type rdf:JSON to a JSON literal (integer).
Tests creating property with rdf:type rdf:JSON to a JSON literal (object).
Tests creating property with rdf:type rdf:JSON to a JSON literal (array).
Processors must generate an error when deserializing an invalid JSON literal.
Invalid JSON literal (invalid structure)
Tests creating property with rdf:type rdf:JSON to a JSON literal (string).
Tests creating property with rdf:type rdf:JSON to a JSON literal (null).
These tests implement the requirements for the JSON-LD [Serialize RDF as JSON-LD Algorithm](https://www.w3.org/TR/json-ld11-api/#serialize-rdf-as-json-ld-algorithm).
Expand drops unreferenced nodes having only @id
Expanding terms with different types of values
If a keyword is aliased, it is not used when expanding
Expanding native scalar retains native scalar within expanded value
Expand does not mess up already expanded document
@set of @value objects with keyword aliases
Expanding a value of null removes the value
Expanding with a default language applies that language to string values
Expanding lists and sets with properties having coercion coerces list/set values
Expanding different kinds of terms and Compact IRIs
@base is used to compact @id; test with different relative IRIs
Expanding native types with type coercion adds the coerced type to an expanded value representation and retains the native value representation
Expanding index maps for terms defined with @container: @index
@language: null resets the default language
Expanding terms defined as reverse properties uses @reverse in expanded document
Expanding a reverse property within a @reverse undoes both reversals
Expanding top-level value objects causes them to be removed
Expanding free-floating nodes causes them to be removed
Free-floating values in sets and free-floating lists
String values of a reverse property with @type: @id are treated as IRIs
Term definitions using compact IRIs don't inherit the definitions of the prefix
Expanding terms which are keyword aliases
If @vocab is defined, term definitions are expanded relative to @vocab
Expanding values of properties of @type: @vocab does not further expand absolute IRIs
Expanding values of properties of @type: @vocab does not expand term values
Expanding values of properties of @type: @vocab expands relative IRIs using @vocab
Checks that expansion uses appropriate base depending on term definition having @type @id or @vocab
Relative values of terms with @type: @vocab expand relative to @vocab
Compact IRIs are expanded normally even if term has @type: @vocab
Setting @vocab to null removes a previous definition
Setting @base to an IRI and then resetting it to nil
Expanding native types when coercing to arbitrary datatypes
Expaning reverse properties with an index-container
Expand uses @vocab to expand keys in reverse-maps
prefix:suffix values are not interpreted as compact IRIs if suffix begins with two slashes
prefix:suffix values are not interpreted as compact IRIs if prefix is an underscore
Redefine compact IRI to define type mapping using the compact IRI itself as value of @id
Compact IRI as term defined using equivalent compact IRI
Redefine compact IRI to define type mapping using the compact IRI itself as string value
Redefining a term as itself when @vocab is defined uses @vocab, not previous term definition
Creates a new graph object if indexed value is already a graph object
Processors SHOULD generate a warning and MUST ignore IRIs having the form of a keyword. (Note: the resulting document will not be valid JSON-LD, due to the `null` value for `@id`)
Value objects can have either @type but not @language or @direction.
Using an array value for @context is illegal in JSON-LD 1.0
Mapping @container: [@list, @set] is invalid
Testing legal combinations of @set with other container values
Tests expanding property with @type @json to a JSON literal (boolean true).
Tests expanding property with @type @json to a JSON literal (boolean false).
Tests expanding property with @type @json to a JSON literal (double).
Tests expanding property with @type @json to a JSON literal (double-zero).
Tests expanding property with @type @json to a JSON literal (integer).
Tests expanding property with @type @json to a JSON literal (object).
Tests expanding property with @type @json to a JSON literal (array).
Expand JSON literal with array canonicalization
Tests expanding JSON literal with array canonicalization.
Tests expanding JSON literal with string canonicalization.
Expand JSON literal with structural canonicalization
Tests expanding JSON literal with structural canonicalization.
Expand JSON literal with unicode canonicalization
Tests expanding JSON literal with unicode canonicalization.
Expand JSON literal with value canonicalization
Tests expanding JSON literal with value canonicalization.
Expand JSON literal with wierd canonicalization
Tests expanding JSON literal with wierd canonicalization.
Expand JSON literal without expanding contents
Tests expanding JSON literal does not expand terms inside json.
Expand JSON literal aleady in expanded form
Tests expanding JSON literal in expanded form.
Expand JSON literal aleady in expanded form with aliased keys
Tests expanding JSON literal in expanded form with aliased keys in value object.
Tests expanding property with @type @json to a JSON literal (string).
Tests expanding property with @type @json to a JSON literal (null).
Tests expanding JSON literal with aliased @type.
Tests expanding JSON literal with aliased @value.
Tests expanding JSON literal with a @context.
Expand JSON literal (null) aleady in expanded form.
Tests expanding property with @type @json to a JSON literal (empty array).
A language map may have a null value, which is ignored
Appends nested values from all @nest aliases
These tests implement the requirements for the JSON-LD [Expansion Algorithm](https://www.w3.org/TR/json-ld11-api/#expansion-algorithm).
Document loader loads a JSON-LD document.
Document loader loads a JSON document having an extension mime-subtype.
loading an unknown type raises loading document failed
Loading a document with a non-JSON mime type raises loading document failed
Loading a document with a redirect should use the redirected URL as document base
Loading a non-existant file raises loading document failed error
<0009-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"
If a context is specified in a link header, it is not used for JSON-LD.
<0010-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"
If a context is specified in a link header, it is used for JSON.
load JSON document with extension-type with link
<0011-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"
If a context is specified in a link header, it is used for a JSON extension type.
<0012-context2.jsonld>; rel="http://www.w3.org/ns/json-ld#context"
<0012-context1.jsonld>; rel="http://www.w3.org/ns/json-ld#context"
Loading a file when multiple link headers are returned is an error
load JSON document with link to HTML document
<0013-context.html>; rel="http://www.w3.org/ns/json-ld#context"
If a context is specified in a link header, it is used for JSON, extracting from HTML.
<la01-alternate.jsonld>; rel="alternate"; type="application/ld+json"
Load an alternate link if type is not ld+json and rel=alternate.
Does not redirect if type is application/ld+json
<la02-alternate.jsonld>; rel="alternate"; type="application/ld+json"
Does not redirect if link type is not application/ld+json
<la03-alternate.json>; rel="alternate"; type="application/json"
Does not redirect if type is application/json
<la04-alternate.jsonld>; rel="alternate"; type="application/ld+json"
<la05-alternate.jsonld>; rel="alternate"; type="application/ld+json"
These tests implement the requirements for JSON-LD [Remote Document and Context Retrieval](https://www.w3.org/TR/json-ld11-api/#remote-document-and-context-retrieval).
Unreferenced nodes not containing properties are dropped
Properties mapped to null or which are never mapped are dropped
Containers mapped to @set keep empty arrays
keep expanded object format if @type doesn't match
Values not matching a coerced @type remain in expanded form
External context is added to the compacted document
Aliases for keywords are used in compacted document
Value with @id is compacted to string if property cast to @id
An array of objects is serialized with @graph
Expanded value with type xsd:dateTime is represented as string with type coercion
Native values are unmodified during compaction
Values with @language remain in expanded form by default
Aliasing @graph uses alias in compacted document
Property with values of different types use most appropriate term when compacting
Compacting a document with multiple embedded uses of @graph
A term mapping to null removes the mapping
Mapping a term to null causes the property and its values to be removed from the compacted document
Lists with values of different types use best term in compacted document
Duplicate values in @list or @set are retained in compacted document
Compact @id that is a property IRI when @container is @list
A term with @container: @list is also used as the value of an @id, if appropriate
Compact properties and types using @vocab
@vocab is used to create relative properties and types if no other term matches
Compact nested properties using @list containers
@vocab takes precedence over prefixes - even if the result is longer
The most specific term that matches all of the elements in the list, taking into account the default language, must be selected.
Multiple values with different languages use language maps if property has @container: @language
Language map term selection with complications
Test appropriate property use given language maps with @vocab, a default language, and a competing term
Fall back to term with @set container if term with language map is defined
Combination of keyword aliases and @vocab
Output uses index mapping if term is defined with @container: @index
Preserve @index tags if not compacted to an index map
A reverse map is replaced with a matching property defined with @reverse
Do not use reverse property if no other property matches as normal property
Compact @reverse node references using strings
Compact node references to strings for reverse properties using @type: @id
Compact reverse properties using index containers
Compact using both reverse properties and index containers
Complex round-tripping use case from Drupal
Ensure that value of @list is always an array
If an index is present, a term having an @list container is not selected
Make sure keyword aliasing works if a list can't be compacted
Ensure that @vocab compaction isn't used if the result collides with a term
Prefer properties with @type: @vocab in reverse-maps if the value can be compacted to a term
Values of @id are transformed to relative IRIs, terms are ignored
multiple objects without @context use @graph
Wrap top-level array into @graph even if no context is passed
Relative URLs remain relative after compaction
Prefer terms with a language mapping set to null over terms without language-mapping for non-strings
Round tripping of lists that contain just IRIs
List compaction without @container: @list still uses strings if @type: @id
Reverse properties require @type: @id to use string values
Node references in reverse properties are not compacted to strings without explicit type-coercion
Native values survive round-tripping with @list
Round tripping @list with scalar and @graph alias
Native values survive round-tripping with @list and @graph alias
Compact to @type: @vocab when no @type: @id term available
Compact to @type: @vocab and compact @id to term
Compacting IRI value of property with @type: @vocab can use term
Prefer @type: @vocab over @type: @id for terms
Complex round tripping @type: @vocab and @type: @id
Compacting IRI value of property with @type: @vocab can use term; more complex
Prefer @type: @id over @type: @vocab for non-terms
Choose a term having @type: @id over @type: @value if value is not a term
Term with @type: @vocab if no @type: @id
If there's no term with @type: @id, use terms with @type: @vocab for IRIs not mapped to terms
Term with @type: @id if no @type: @vocab and term value
If there's no term with @type: @vocab, use terms with @type: @id for IRIs mapped to terms
@type: @vocab/@id with values matching either
Separate IRIs for the same property to use term with more specific @type (@id vs. @vocab)
Relative IRIs don't round-trip with @type: @vocab
Compact IRI round-tripping with @type: @vocab
Term with @type: @vocab will use compact IRIs
Compact language-tagged and indexed strings to index-map
Given values with both @index and @language and term index-map term, use index map
Language-tagged and indexed strings with language-map
Language-tagged and indexed strings don't compact to language-map
Complex use cases for relative IRI compaction
Compact reverse property whose values are unlabeled blank nodes
Single values of reverse properties are compacted as values of ordinary properties
Single value reverse properties with @set
Single values are kept in array form for reverse properties if the container is to @set
Input has multiple @contexts, output has one
Expanding input with multiple @contexts and compacting with just one doesn't output undefined properties
Default language and unmapped properties
Ensure that the default language is handled correctly for unmapped properties
Ensure that compaction works with mapped @id and @type
Ensure that compaction works for empty list when property has container declared as @list and type as @id
Compact using relative fragment identifier
Compacting IRI equivalent to base, uses last path segment of base ending in '/'
Compact a @graph container having @index
Verify that having both @graph and @index allows @graph container compaction
Do not compact a graph having @id with a term having an @graph container
Graph compaction works only on simple graphs
Compact a [@graph, @index, @set] container
Compact a @graph container with @index and @set
[@graph, @index] does not compact graph with @id
Graph compaction with @graph and @index works only on simple graphs
Compact a simple graph with a [@graph, @id] container
Compact a simple graph using a @graph container with @id
Compact a named graph with a [@graph, @id] container
Compact a named graph using a @graph container with @id
Compact a simple graph with a [@graph, @id, @set] container
Compact a simple graph using a @graph container with @id and @set
Compact a named graph with a [@graph, @id, @set] container
Compact a named graph using a @graph container with @id and @set
Compact a graph with @index using a [@graph, @id] container
Compact a @graph container with @id and @set, discarding an @index value
Test appropriate property use given language maps with @vocab, a default language, no language, and competing terms
Compact input with @graph container to output without @graph container
Ensure @graph appears properly in output
Compact input with @graph container to output without @graph container with compactArrays unset
Ensure @graph appears properly in output with compactArrays unset
Compact input with [@graph, @set] container to output without [@graph, @set] container
Compact input with [@graph, @set] container to output without [@graph, @set] container with compactArrays unset
Relative propererty IRIs with @vocab: ''
Complex use cases for relative IRI compaction or properties
Compact @graph container (multiple graphs)
Compact [@graph, @set] container (multiple graphs)
Compact [@graph, @index] container (multiple indexed objects)
Compact [@graph, @index, @set] container (multiple indexed objects)
Compact [@graph, @id] container (multiple indexed objects)
Compact [@graph, @id, @set] container (multiple indexed objects)
Compact [@graph, @index] container (multiple indexes and objects)
Compact [@graph, @id] container (multiple ids and objects)
Ensures that a single @type value is represented as an array
Compact @type with @container: @set using an alias of @type
Do not compact @type with @container: @set to an array using an alias of @type
Ensures that a single @type value is not represented as an array in 1.0
Compact with context including JavaScript Object property names
Compact @graph container (multiple objects)
Multiple objects in a simple graph with a graph container need to use @included
Compact [@graph, @set] container (multiple objects)
Compaction using a scoped context uses term scope for selecting proper term
Nullifying a type-scoped context continues to use the previous context when compacting @type.
Empty-property scoped context does not affect term selection.
Adding a minimal/empty property-scoped context should not affect the using terms defined in outer context.
Uses term with null direction when two terms conflict on direction.
Term selection includes values of @list.
simple language map with overriding term direction
simple language map with overriding null direction
Verifies that IRI compaction detects when the result is an absolute IRI with a scheme matching a term.
@prefix is not allowed in a term definition 1.0
@prefix must be a boolean in a term definition in 1.1
If processingMode is json-ld-1.0, or if term contains a colon (:), an invalid term definition has been detected and processing is aborted.
@nest is not allowed in a term definitionin 1.0
@context is not allowed in a term definitionin 1.0
validate appropriate values of @container
Tests compacting property with @type @json to a JSON literal (boolean true).
Tests compacting property with @type @json to a JSON literal (boolean false).
Tests compacting property with @type @json to a JSON literal (double).
Tests compacting property with @type @json to a JSON literal (double-zero).
Tests compacting property with @type @json to a JSON literal (integer).
Tests compacting property with @type @json to a JSON literal (object).
Tests compacting property with @type @json to a JSON literal (array).
Tests compacting JSON literal does not expand terms inside json.
Compact already expanded JSON literal with aliased keys
Tests compacting JSON literal in expanded form.
Tests compacting property with @type @json to a JSON literal (string).
Tests compacting property with @type @json to a JSON literal (null).
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.
Indexes to object already having an @type
@index map with @none value using alias of @none
language map with no @language using alias of @none
node reference compacts to string value of type map
node reference compacts to string value of type map with @type: @id
node reference compacts to string value of type map with @type: @vocab
Indexes to @nest for property with @nest
Indexes to @nest for all properties with @nest
Nests using alias of @nest (defined with @id)
Compact IRI will not use an expanded term definition in 1.0
Terms with an expanded term definition are not used for creating compact IRIs
Compact IRI does not use expanded term definition in 1.1
Compact IRI does not use simple term that does not end with a gen-delim
Terms not ending with a gen-delim are not used for creating compact IRIs
Compact IRIs using simple terms ending with gen-delim
All simple terms ending with gen-delim are suitable for compaction
Compact IRI uses term with definition including @prefix: true
Expanded term definition may set prefix explicitly in 1.1
Terms including a colon are excluded from being used as a prefix
Compact IRI does not use term with definition including @prefix: false
property-valued index indexes property value, instead of property (value)
property-valued index indexes property value, instead of property (multiple values)
property-valued index indexes property value, instead of property (node)
property-valued index indexes property value, instead of property (multiple nodes)
property-valued index indexes using @none if no property value exists
property-valued index indexes using @none if no property value does not compact to string
Check illegal clearing of context with protected terms
Check error when clearing a context with protected terms.
Check illegal overriding of protected term
Check illegal overriding of protected term from type-scoped context
Check error when overriding a protected term from type-scoped context.
Check legal overriding of protected term from property-scoped context
Check overriding a protected term from property-scoped context.
Expands and compacts to document base by default
Compact IRI attempts to compact document-relative IRIs
Expands and does not compact to document base with compactToRelative false
With compactToRelative option set to false, IRIs which could be made relative to the document base are not made relative.
@context with array including @set uses array values
@context values may include @set along with another compatible value
@type: @none does not use arrays by default
@type: @none uses arrays with @container: @set
These tests implement the requirements for the JSON-LD [Compaction Algorithm](https://www.w3.org/TR/json-ld11-api/#compaction-algorithm).
JSON-LD 1.1 Processing Algorithms and API and Framing