Skip to content

Expansion test e005 should require specVersion to be json-ld-1.1 #107

@lo48576

Description

@lo48576

Expansion test e005 is a test to check the processor returns invalid remote context error.
In that test, specVersion is not specified, but the input refers itself recursively, so it seems to be recursive context inclusion error by JSON-LD 1.0 processor with JSON-LD 1.0 spec.

Input (e005):

[{
"@context": "e005-in.jsonld",
"@id": "http://example/test#example"
}]

Manifest (e005):

"@id": "#te005",
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
"name": "Invalid remote context",
"purpose": "Verifies that an exception is raised on expansion when a remote context is not an object containing @context",
"input": "expand/e005-in.jsonld",
"expect": "invalid remote context"

e002 is similar test with "specVersion": "json-ld-1.0".
In this test, processor is expected to abort with recursive context inclusion error.

Input (e002):

{
"@context": "e002-in.jsonld",
"@id": "http://example/test#example"
}

Manifest (e002):

"@id": "#te002",
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
"name": "A context may not include itself recursively (direct)",
"purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself",
"input": "expand/e002-in.jsonld",
"expect": "recursive context inclusion",
"option": {"specVersion": "json-ld-1.0"}

According to the step 3.2.2 in JSON-LD 1.0 context processing algorithm, both e002 and e005 should abort with recursive context inclusion.
(Note that invalid remote context might be returned in the step 3.2.3 in JSON-LD 1.0 spec. The processor won't reach that step with e005 test case.)

I think the test e005 should be applied only for processors implemented with JSON-LD 1.1 spec, but not for processors with 1.0 spec.
And if it is correct, "option": {"specVersion": "json-ld-1.1"} should be specified in manifest entry for e005 test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions