W3C

Framing

These tests implement the requirements for the JSON-LD Framing Algorithm.

This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at frame-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 API Specification maintains its own test suite.

General instructions for running the JSON-LD Test suites

frame tests have input, frame and expected 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-framing.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-framing/tests/

Test sequence:

Test t0001 Library framing example
id
#t0001
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Basic example used in playgrond and spec examples.
input
frame/0001-in.jsonld
frame
frame/0001-frame.jsonld
expect
frame/0001-out.jsonld
Options
processingMode
json-ld-1.0
Test t0002 reframe w/extra CURIE value.
id
#t0002
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Append extra values to output.
input
frame/0002-in.jsonld
frame
frame/0002-frame.jsonld
expect
frame/0002-out.jsonld
Options
processingMode
json-ld-1.0
Test t0003 reframe (null)
id
#t0003
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Do not match without a matching @type
input
frame/0003-in.jsonld
frame
frame/0003-frame.jsonld
expect
frame/0003-out.jsonld
Options
processingMode
json-ld-1.0
Test t0004 reframe (type)
id
#t0004
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Multiple matches on @type.
input
frame/0004-in.jsonld
frame
frame/0004-frame.jsonld
expect
frame/0004-out.jsonld
Options
processingMode
json-ld-1.0
Test t0005 reframe (explicit)
id
#t0005
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If property is not in frame, and explicit is true, do not add any values for property to output.
input
frame/0005-in.jsonld
frame
frame/0005-frame.jsonld
expect
frame/0005-out.jsonld
Options
processingMode
json-ld-1.0
Test t0006 reframe (non-explicit)
id
#t0006
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Unless the explicit is false, processors append extra values to output.
input
frame/0006-in.jsonld
frame
frame/0006-frame.jsonld
expect
frame/0006-out.jsonld
Options
processingMode
json-ld-1.0
Test t0007 input has multiple types
id
#t0007
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If property is a keyword, processors add property and objects to output.
input
frame/0007-in.jsonld
frame
frame/0007-frame.jsonld
expect
frame/0007-out.jsonld
Options
processingMode
json-ld-1.0
Test t0008 array framing cases
id
#t0008
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Various cases showing array output for @container: @set, and non-embedding of node values if @embed: false.
input
frame/0008-in.jsonld
frame
frame/0008-frame.jsonld
expect
frame/0008-out.jsonld
Options
processingMode
json-ld-1.0
Test t0009 default value
id
#t0009
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
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.
input
frame/0009-in.jsonld
frame
frame/0009-frame.jsonld
expect
frame/0009-out.jsonld
Options
processingMode
json-ld-1.0
Test t0010 property CURIE conflict
id
#t0010
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
(Not really framing) A term looking like a CURIE becomes a CURIE when framing/compacting if defined as such in frame/context in json-ld-1.0.
input
frame/0010-in.jsonld
frame
frame/0010-frame.jsonld
expect
frame/0010-out.jsonld
Options
specVersion
json-ld-1.0
Test t0011 @embed true/false
id
#t0011
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@embed within a frame controls the object embed flag when processing that frame (true and false values) in json-ld-1.0 mode.
input
frame/0011-in.jsonld
frame
frame/0011-frame.jsonld
expect
frame/0011-out.jsonld
Options
specVersion
json-ld-1.1
Test t0012 Array frame
id
#t0012
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
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.
input
frame/0012-in.jsonld
frame
frame/0012-frame.jsonld
expect
frame/0012-out.jsonld
Test t0013 Replace existing embed
id
#t0013
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
An empty frame matches all objects, even if embedded, causing them to be serialized under @graph.
input
frame/0013-in.jsonld
frame
frame/0013-frame.jsonld
expect
frame/0013-out.jsonld
Test t0014 Replace existing embed on 2nd pass
id
#t0014
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
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.
input
frame/0014-in.jsonld
frame
frame/0014-frame.jsonld
expect
frame/0014-out.jsonld
Test t0015 Replace deeply-nested embed
id
#t0015
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Torture test.
input
frame/0015-in.jsonld
frame
frame/0015-frame.jsonld
expect
frame/0015-out.jsonld
Test t0016 Use @type in ducktype filter
id
#t0016
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Match if node has a @type property and frame has a @type property containing only an empty dictionary.
input
frame/0016-in.jsonld
frame
frame/0016-frame.jsonld
expect
frame/0016-out.jsonld
Options
processingMode
json-ld-1.0
Test t0017 Non-flat input
id
#t0017
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Framing flattens expanded input, allowing for deeply embedded input to be re-framed.
input
frame/0017-in.jsonld
frame
frame/0017-frame.jsonld
expect
frame/0017-out.jsonld
Options
processingMode
json-ld-1.0
Test t0018 no frame @context but @graph output
id
#t0018
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Set framing context to the value of @context from frame, if it exists, or to a new empty context, otherwise.
input
frame/0018-in.jsonld
frame
frame/0018-frame.jsonld
expect
frame/0018-out.jsonld
Options
processingMode
json-ld-1.0
Test t0019 Resources can be re-embedded again in each top-level frame match
id
#t0019
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@type matching matches nodes at top-level, and embedding causes them be embedded where referenced.
input
frame/0019-in.jsonld
frame
frame/0019-frame.jsonld
expect
frame/0019-out.jsonld
Test t0020 Blank nodes in an array
id
#t0020
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Empty frame matches all nodes at top-level, and repeats where embedded in json-ld-1.0 mode.
input
frame/0020-in.jsonld
frame
frame/0020-frame.jsonld
expect
frame/0020-out.jsonld
Options
specVersion
json-ld-1.1
processingMode
json-ld-1.0
Test t0021 Blank nodes in @type
id
#t0021
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Empty frame matches all nodes at top-level, and repeats where embedded (with list content) in json-ld-1.0 mode.
input
frame/0021-in.jsonld
frame
frame/0021-frame.jsonld
expect
frame/0021-out.jsonld
Options
specVersion
json-ld-1.1
processingMode
json-ld-1.0
Test t0022 Match on @id
id
#t0022
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Match if node and frame both have the same @id property.
input
frame/0022-in.jsonld
frame
frame/0022-frame.jsonld
expect
frame/0022-out.jsonld
Options
processingMode
json-ld-1.0
Test t0023 No match on []
id
#t0023
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
No match if node has a property where frame has an empty array for that same property.
input
frame/0023-in.jsonld
frame
frame/0023-frame.jsonld
expect
frame/0023-out.jsonld
Options
specVersion
json-ld-1.1
Test t0024 match on any common properties if @requireAll: false
id
#t0024
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Match if @requireAll is false and both node and frame contain common non-keyword properties of any value.
input
frame/0024-in.jsonld
frame
frame/0024-frame.jsonld
expect
frame/0024-out.jsonld
Options
specVersion
json-ld-1.1
Test t0025 @requireAll with missing values and @default
id
#t0025
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
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.
input
frame/0025-in.jsonld
frame
frame/0025-frame.jsonld
expect
frame/0025-out.jsonld
Options
specVersion
json-ld-1.1
Test t0026 explicitly excludes unframed properties (@explicit: true)
id
#t0026
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If property is not in frame, and explicit is true, processors must not add any values for property to output.
input
frame/0026-in.jsonld
frame
frame/0026-frame.jsonld
expect
frame/0026-out.jsonld
Options
specVersion
json-ld-1.1
Test t0027 non-existent framed properties create null property
id
#t0027
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
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.
input
frame/0027-in.jsonld
frame
frame/0027-frame.jsonld
expect
frame/0027-out.jsonld
Options
specVersion
json-ld-1.1
Test t0028 embed matched frames with @reverse
id
#t0028
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If frame has the property @reverse, then for each reverse property and sub frame that are the values of @reverse in frame.
input
frame/0028-in.jsonld
frame
frame/0028-frame.jsonld
expect
frame/0028-out.jsonld
Options
specVersion
json-ld-1.1
Test t0029 embed matched frames with reversed property
id
#t0029
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If frame has the property @reverse, then for each reverse property and sub frame that are the values of @reverse in frame.
input
frame/0029-in.jsonld
frame
frame/0029-frame.jsonld
expect
frame/0029-out.jsonld
Options
specVersion
json-ld-1.1
Test t0030 @embed @always/@never
id
#t0030
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@embed within a frame controls the object embed flag when processing that frame (@always and @never values).
input
frame/0030-in.jsonld
frame
frame/0030-frame.jsonld
expect
frame/0030-out.jsonld
Options
specVersion
json-ld-1.1
Test t0031 match none @type match
id
#t0031
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Do not match objects with @type, if frame uses @type: [].
input
frame/0031-in.jsonld
frame
frame/0031-frame.jsonld
expect
frame/0031-out.jsonld
Options
specVersion
json-ld-1.1
Test t0032 single @id match
id
#t0032
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Match on a specific node with frame uses @id.
input
frame/0032-in.jsonld
frame
frame/0032-frame.jsonld
expect
frame/0032-out.jsonld
Options
specVersion
json-ld-1.1
Test t0033 multiple @id match
id
#t0033
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Match on a specific node with frame uses @id with an array of IRIs.
input
frame/0033-in.jsonld
frame
frame/0033-frame.jsonld
expect
frame/0033-out.jsonld
Options
specVersion
json-ld-1.1
Test t0034 wildcard and match none
id
#t0034
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Match/reject properties using both wildcard and match none.
input
frame/0034-in.jsonld
frame
frame/0034-frame.jsonld
expect
frame/0034-out.jsonld
Options
specVersion
json-ld-1.1
Test t0035 matches a deep node pattern
id
#t0035
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Node patterns that don't match all levels, don't match top level.
input
frame/0035-in.jsonld
frame
frame/0035-frame.jsonld
expect
frame/0035-out.jsonld
Options
specVersion
json-ld-1.1
Test t0036 matches exact value pattern
id
#t0036
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0036-in.jsonld
frame
frame/0036-frame.jsonld
expect
frame/0036-out.jsonld
Options
specVersion
json-ld-1.1
Test t0037 matches wildcard @value in value pattern
id
#t0037
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0037-in.jsonld
frame
frame/0037-frame.jsonld
expect
frame/0037-out.jsonld
Options
specVersion
json-ld-1.1
Test t0038 matches wildcard @type in value pattern
id
#t0038
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0038-in.jsonld
frame
frame/0038-frame.jsonld
expect
frame/0038-out.jsonld
Options
specVersion
json-ld-1.1
Test t0039 matches wildcard @language in value pattern
id
#t0039
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0039-in.jsonld
frame
frame/0039-frame.jsonld
expect
frame/0039-out.jsonld
Options
specVersion
json-ld-1.1
Test t0040 matches match none @type in value pattern
id
#t0040
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0040-in.jsonld
frame
frame/0040-frame.jsonld
expect
frame/0040-out.jsonld
Options
specVersion
json-ld-1.1
Test t0041 matches match none @language in value pattern
id
#t0041
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0041-in.jsonld
frame
frame/0041-frame.jsonld
expect
frame/0041-out.jsonld
Options
specVersion
json-ld-1.1
Test t0042 matches some @value in value pattern
id
#t0042
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0042-in.jsonld
frame
frame/0042-frame.jsonld
expect
frame/0042-out.jsonld
Options
specVersion
json-ld-1.1
Test t0043 matches some @type in value pattern
id
#t0043
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0043-in.jsonld
frame
frame/0043-frame.jsonld
expect
frame/0043-out.jsonld
Options
specVersion
json-ld-1.1
Test t0044 matches some @language in value pattern
id
#t0044
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0044-in.jsonld
frame
frame/0044-frame.jsonld
expect
frame/0044-out.jsonld
Options
specVersion
json-ld-1.1
Test t0045 excludes non-matched values in value pattern
id
#t0045
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value objects matching value patterns are output, others are filtered.
input
frame/0045-in.jsonld
frame
frame/0045-frame.jsonld
expect
frame/0045-out.jsonld
Options
specVersion
json-ld-1.1
Test t0046 Merge graphs if no outer @graph is used
id
#t0046
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Unless @graph exists at the top level, framing uses merged node objects in json-ld-1.0 mode.
input
frame/0046-in.jsonld
frame
frame/0046-frame.jsonld
expect
frame/0046-out.jsonld
Options
specVersion
json-ld-1.1
processingMode
json-ld-1.0
Test t0047 Frame default graph if outer @graph is used
id
#t0047
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If @graph exists at the top level, framing uses the default graph.
input
frame/0047-in.jsonld
frame
frame/0047-frame.jsonld
expect
frame/0047-out.jsonld
Options
specVersion
json-ld-1.1
Test t0048 Merge one graph and preserve another
id
#t0048
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@graph used within a property value frames embedded values from a named graph.
input
frame/0048-in.jsonld
frame
frame/0048-frame.jsonld
expect
frame/0048-out.jsonld
Options
specVersion
json-ld-1.1
Test t0049 Merge one graph and deep preserve another
id
#t0049
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@graph used within a property value frames embedded values from a named graph in json-ld-1.0 mode.
input
frame/0049-in.jsonld
frame
frame/0049-frame.jsonld
expect
frame/0049-out.jsonld
Options
specVersion
json-ld-1.1
processingMode
json-ld-1.0
Test t0050 Library example with named graphs
id
#t0050
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
input
frame/0050-in.jsonld
frame
frame/0050-frame.jsonld
expect
frame/0050-out.jsonld
Options
specVersion
json-ld-1.1
Test t0051 Compacting values of @preserve
id
#t0051
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
When compacting the value of a property using @preserve, use the term definition for term to properly compact the value of @preserve.
input
frame/0051-in.jsonld
frame
frame/0051-frame.jsonld
expect
frame/0051-out.jsonld
Options
specVersion
json-ld-1.1
Test t0052 @id must not include a blank node identifier
id
#t0052
Type
jld:NegativeEvaluationTest, jld:FrameTest
Purpose
Node matching does not consider blank nodes.
input
frame/0052-in.jsonld
frame
frame/0052-frame.jsonld
expect
invalid frame
Options
specVersion
json-ld-1.1
Test t0053 @type must not include a blank node identifier
id
#t0053
Type
jld:NegativeEvaluationTest, jld:FrameTest
Purpose
Node matching does not consider blank nodes.
input
frame/0053-in.jsonld
frame
frame/0053-frame.jsonld
expect
invalid frame
Options
specVersion
json-ld-1.1
Test t0054 Out of range @embed value
id
#t0054
Type
jld:NegativeEvaluationTest, jld:FrameTest
Purpose
Any other value for @embed is invalid and indicates that an invalid @embed value error has been detected and processing is aborted.
input
frame/0054-in.jsonld
frame
frame/0054-frame.jsonld
expect
invalid @embed value
Options
specVersion
json-ld-1.1
Test t0055 Framing list with mixed values
id
#t0055
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Framing list values which are mixed.
input
frame/0055-in.jsonld
frame
frame/0055-frame.jsonld
expect
frame/0055-out.jsonld
Test t0056 Frame matching on matching value in list
id
#t0056
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Lists match on any matching value.
input
frame/0056-in.jsonld
frame
frame/0056-frame.jsonld
expect
frame/0056-out.jsonld
Options
specVersion
json-ld-1.1
Test t0057 Frame matching on any matching value in list
id
#t0057
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Lists match on any matching value.
input
frame/0057-in.jsonld
frame
frame/0057-frame.jsonld
expect
frame/0057-out.jsonld
Options
specVersion
json-ld-1.1
Test t0058 Frame matching with no matching value in list
id
#t0058
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Lists match on any matching value.
input
frame/0058-in.jsonld
frame
frame/0058-frame.jsonld
expect
frame/0058-out.jsonld
Options
specVersion
json-ld-1.1
omitGraph
false
Test t0059 @embed: @last replaces previous embed values with node reference
id
#t0059
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Verify that within a matched node, by default only the last reference will be embedded in json-ld-1.0 mode.
input
frame/0059-in.jsonld
frame
frame/0059-frame.jsonld
expect
frame/0059-out.jsonld
Options
specVersion
json-ld-1.1
processingMode
json-ld-1.0
Test t0060 @embed: @once only embeds first value with node reference
id
#t0060
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Verify that within a matched node and @embed: @first, by only the first reference will be embedded.
input
frame/0060-in.jsonld
frame
frame/0060-frame.jsonld
expect
frame/0060-out.jsonld
Options
specVersion
json-ld-1.1
ordered
true
Test t0061 Matching embedded nodes with @default
id
#t0061
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Verify that embedded nodes match with @default and a wildcard @id.
input
frame/0061-in.jsonld
frame
frame/0061-frame.jsonld
expect
frame/0061-out.jsonld
Options
specVersion
json-ld-1.1
Test t0062 An array with a single value remains an array if container is @set.
id
#t0062
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Cleaning up @preserve/@null does not violate container: @set.
input
frame/0062-in.jsonld
frame
frame/0062-frame.jsonld
expect
frame/0062-out.jsonld
Options
specVersion
json-ld-1.1
Test t0063 Using @null in @default.
id
#t0063
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@null may be used as an @default value and is preserved in output.
input
frame/0063-in.jsonld
frame
frame/0063-frame.jsonld
expect
frame/0063-out.jsonld
Options
specVersion
json-ld-1.1
Test t0064 Using @default in @type.
id
#t0064
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@type may have a default value.
input
frame/0064-in.jsonld
frame
frame/0064-frame.jsonld
expect
frame/0064-out.jsonld
Options
specVersion
json-ld-1.1
Test t0065 Match on value
id
#t0065
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value matching.
input
frame/0065-in.jsonld
frame
frame/0065-frame.jsonld
expect
frame/0065-out.jsonld
Options
specVersion
json-ld-1.1
Test t0066 Match on value reference
id
#t0066
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Value reference matching.
input
frame/0066-in.jsonld
frame
frame/0066-frame.jsonld
expect
frame/0066-out.jsonld
Options
specVersion
json-ld-1.1
Test t0067 Match on list value
id
#t0067
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
List value matching.
input
frame/0067-in.jsonld
frame
frame/0067-frame.jsonld
expect
frame/0067-out.jsonld
Options
specVersion
json-ld-1.1
Test t0068 Merge @type from different graphs
id
#t0068
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
When merging nodes, ensure that @type values from each node are retained.
input
frame/0068-in.jsonld
frame
frame/0068-frame.jsonld
expect
frame/0068-out.jsonld
Options
specVersion
json-ld-1.1
Test t0069 Tests @json in framing
id
#t0069
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test collection to better define what is expected when framing over a `@json` field..
input
frame/0069-in.jsonld
frame
frame/0069-frame.jsonld
expect
frame/0069-out.jsonld
Options
specVersion
json-ld-1.1
Test teo01 @embed true/false
id
#teo01
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@embed within a frame controls the object embed flag when processing that frame (true and false values).
input
frame/eo01-in.jsonld
frame
frame/eo01-frame.jsonld
expect
frame/eo01-out.jsonld
Options
specVersion
json-ld-1.1
Test tg001 Library framing example with @graph and omitGraph is true.
id
#tg001
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Basic example used in playground and spec examples.
input
frame/g001-in.jsonld
frame
frame/g001-frame.jsonld
expect
frame/g001-out.jsonld
Options
specVersion
json-ld-1.1
omitGraph
true
Test tg002 Simple embed
id
#tg002
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g002-in.jsonld
frame
frame/g002-frame.jsonld
expect
frame/g002-out.jsonld
Options
specVersion
json-ld-1.1
Test tg003 Embed with direct circular reference
id
#tg003
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g003-in.jsonld
frame
frame/g003-frame.jsonld
expect
frame/g003-out.jsonld
Options
specVersion
json-ld-1.1
Test tg004 Embed with indirect circular reference
id
#tg004
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g004-in.jsonld
frame
frame/g004-frame.jsonld
expect
frame/g004-out.jsonld
Options
specVersion
json-ld-1.1
Test tg005 Embed with indirect circular reference via set
id
#tg005
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g005-in.jsonld
frame
frame/g005-frame.jsonld
expect
frame/g005-out.jsonld
Options
specVersion
json-ld-1.1
Test tg006 Embed with nested indirect circular reference via set
id
#tg006
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g006-in.jsonld
frame
frame/g006-frame.jsonld
expect
frame/g006-out.jsonld
Options
specVersion
json-ld-1.1
Test tg007 Multi-level simple embeds
id
#tg007
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g007-in.jsonld
frame
frame/g007-frame.jsonld
expect
frame/g007-out.jsonld
Options
specVersion
json-ld-1.1
Test tg008 A tangle of nastiness
id
#tg008
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g008-in.jsonld
frame
frame/g008-frame.jsonld
expect
frame/g008-out.jsonld
Options
specVersion
json-ld-1.1
Test tg009 Recursive property embed w/o circular reference
id
#tg009
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g009-in.jsonld
frame
frame/g009-frame.jsonld
expect
frame/g009-out.jsonld
Options
specVersion
json-ld-1.1
Test tg010 Framing blank node unnamed graphs
id
#tg010
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Test embedded graphs
input
frame/g010-in.jsonld
frame
frame/g010-frame.jsonld
expect
frame/g010-out.jsonld
Options
specVersion
json-ld-1.1
Test tin01 Basic Included array
id
#tin01
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Tests included blocks.
input
frame/in01-in.jsonld
frame
frame/in01-frame.jsonld
expect
frame/in01-out.jsonld
Options
specVersion
json-ld-1.1
Test tin02 Basic Included object
id
#tin02
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Tests included blocks.
input
frame/in02-in.jsonld
frame
frame/in02-frame.jsonld
expect
frame/in02-out.jsonld
Options
specVersion
json-ld-1.1
Test tin03 json.api example
id
#tin03
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Tests included blocks.
input
frame/in03-in.jsonld
frame
frame/in03-frame.jsonld
expect
frame/in03-out.jsonld
Options
specVersion
json-ld-1.1
Test tp020 Blank nodes in an array (prune bnodes)
id
#tp020
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Empty frame matches all nodes at top-level, and repeats where embedded.
input
frame/0020-in.jsonld
frame
frame/0020-frame.jsonld
expect
frame/p020-out.jsonld
Options
specVersion
json-ld-1.1
Test tp021 Blank nodes in @type (prune bnodes)
id
#tp021
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Empty frame matches all nodes at top-level, and repeats where embedded (with list content).
input
frame/0021-in.jsonld
frame
frame/0021-frame.jsonld
expect
frame/p021-out.jsonld
Options
specVersion
json-ld-1.1
Test tp046 Merge graphs if no outer @graph is used (prune bnodes)
id
#tp046
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
Unless @graph exists at the top level, framing uses merged node objects.
input
frame/0046-in.jsonld
frame
frame/0046-frame.jsonld
expect
frame/p046-out.jsonld
Options
specVersion
json-ld-1.1
Test tp049 Merge one graph and deep preserve another (prune bnodes)
id
#tp049
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
@graph used within a property value frames embedded values from a named graph.
input
frame/0049-in.jsonld
frame
frame/0049-frame.jsonld
expect
frame/p049-out.jsonld
Options
specVersion
json-ld-1.1
Test tp050 Prune blank nodes with alias of @id
id
#tp050
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If @id is aliased in a frame, an unreferenced blank node is still pruned.
input
frame/p050-in.jsonld
frame
frame/p050-frame.jsonld
expect
frame/p050-out.jsonld
Options
specVersion
json-ld-1.1
Test tra01 @requireAll only matches if @type and other properties are present
id
#tra01
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If @requireAll is true, then all listed properties, including @type, must be present to match.
input
frame/ra01-in.jsonld
frame
frame/ra01-frame.jsonld
expect
frame/ra01-out.jsonld
Options
specVersion
json-ld-1.1
Test tra02 @requireAll only matches if @id and @type match
id
#tra02
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If @requireAll is true, then all listed properties, including @id and @type, must be present to match.
input
frame/ra02-in.jsonld
frame
frame/ra02-frame.jsonld
expect
frame/ra02-out.jsonld
Options
specVersion
json-ld-1.1
Test tra03 @requireAll with type and properties
id
#tra03
Type
jld:PositiveEvaluationTest, jld:FrameTest
Purpose
If @requireAll is true, then all listed properties, including @type, must be present to match.
input
frame/ra03-in.jsonld
frame
frame/ra03-frame.jsonld
expect
frame/ra03-out.jsonld
Options
specVersion
json-ld-1.1