Skip to content

Clarify BNode pruning with keyword aliases #643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/latest/json-ld-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,9 @@ <h2>RDF Serialization/Deserialization</h2>
so long as the end result is indistinguishable from the result that would
be obtained by the specification's algorithms.</p>

<p>In algorithm steps that describe operations on <a>keywords</a>, those steps
also apply to <a>keyword aliases</a>.</p>

<p class="note">Implementers can partially check their level of conformance to
this specification by successfully passing the test cases of the JSON-LD test
suite [[JSON-LD-TESTS]]. Note, however, that passing all the tests in the test
Expand Down
3 changes: 3 additions & 0 deletions spec/latest/json-ld-framing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,9 @@ <h3>Framing Named Graphs</h3>
so long as the end result is indistinguishable from the result that would
be obtained by the specification's algorithms.</p>

<p>In algorithm steps that describe operations on <a>keywords</a>, those steps
also apply to <a>keyword aliases</a>.</p>

<p class="note">Implementers can partially check their level of conformance to
this specification by successfully passing the test cases of the JSON-LD test
suite [[JSON-LD-TESTS]]. Note, however, that passing all the tests in the test
Expand Down
19 changes: 14 additions & 5 deletions test-suite/tests/frame-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"input": "frame-0010-in.jsonld",
"frame": "frame-0010-frame.jsonld",
"expect": "frame-0010-out.jsonld",
"option": {"pruneBlankNodeIdentifiers": false}
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
}, {
"@id": "#t0011",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
Expand Down Expand Up @@ -167,7 +167,7 @@
"input": "frame-0020-in.jsonld",
"frame": "frame-0020-frame.jsonld",
"expect": "frame-0020-out.jsonld",
"option": {"pruneBlankNodeIdentifiers": false}
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
}, {
"@id": "#t0021",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
Expand All @@ -176,7 +176,7 @@
"input": "frame-0021-in.jsonld",
"frame": "frame-0021-frame.jsonld",
"expect": "frame-0021-out.jsonld",
"option": {"pruneBlankNodeIdentifiers": false}
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
}, {
"@id": "#t0022",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
Expand Down Expand Up @@ -400,7 +400,7 @@
"input": "frame-0046-in.jsonld",
"frame": "frame-0046-frame.jsonld",
"expect": "frame-0046-out.jsonld",
"option": {"pruneBlankNodeIdentifiers": false, "specVersion": "json-ld-1.1"}
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
}, {
"@id": "#t0047",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
Expand All @@ -427,7 +427,7 @@
"input": "frame-0049-in.jsonld",
"frame": "frame-0049-frame.jsonld",
"expect": "frame-0049-out.jsonld",
"option": {"pruneBlankNodeIdentifiers": false, "specVersion": "json-ld-1.1"}
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
}, {
"@id": "#t0050",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
Expand Down Expand Up @@ -571,6 +571,15 @@
"frame": "frame-0049-frame.jsonld",
"expect": "frame-p049-out.jsonld",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tp050",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
"name": "Prune blank nodes with alias of @id",
"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",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}
]
}
8 changes: 8 additions & 0 deletions test-suite/tests/frame-p050-frame.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": {
"@vocab": "http://example/",
"id": "@id"
},
"id": {},
"name": {}
}
8 changes: 8 additions & 0 deletions test-suite/tests/frame-p050-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": {
"@vocab": "http://example/",
"id": "@id"
},
"id": "_:bnode0",
"name": "foo"
}
7 changes: 7 additions & 0 deletions test-suite/tests/frame-p050-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"@context": {
"@vocab": "http://example/",
"id": "@id"
},
"@graph": [{"name": "foo"}]
}