Skip to content

Commit 25ffb1d

Browse files
committed
Clarify BNode pruning with keyword aliases:
* Add statement to Conformance sections of API and Framing that algorithm steps describing operations on keywords also apply to aliases of those keywords to make it clear. * Add example using alias of `@id`. Fixes #611.
1 parent 2f23de3 commit 25ffb1d

File tree

6 files changed

+43
-5
lines changed

6 files changed

+43
-5
lines changed

spec/latest/json-ld-api/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,9 @@ <h2>RDF Serialization/Deserialization</h2>
737737
so long as the end result is indistinguishable from the result that would
738738
be obtained by the specification's algorithms.</p>
739739

740+
<p>In algorithm steps that describe operations on <a>keywords</a>, those steps
741+
also apply to <a>keyword aliases</a>.</p>
742+
740743
<p class="note">Implementers can partially check their level of conformance to
741744
this specification by successfully passing the test cases of the JSON-LD test
742745
suite [[JSON-LD-TESTS]]. Note, however, that passing all the tests in the test

spec/latest/json-ld-framing/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,9 @@ <h3>Framing Named Graphs</h3>
806806
so long as the end result is indistinguishable from the result that would
807807
be obtained by the specification's algorithms.</p>
808808

809+
<p>In algorithm steps that describe operations on <a>keywords</a>, those steps
810+
also apply to <a>keyword aliases</a>.</p>
811+
809812
<p class="note">Implementers can partially check their level of conformance to
810813
this specification by successfully passing the test cases of the JSON-LD test
811814
suite [[JSON-LD-TESTS]]. Note, however, that passing all the tests in the test

test-suite/tests/frame-manifest.jsonld

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"input": "frame-0010-in.jsonld",
8787
"frame": "frame-0010-frame.jsonld",
8888
"expect": "frame-0010-out.jsonld",
89-
"option": {"pruneBlankNodeIdentifiers": false}
89+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
9090
}, {
9191
"@id": "#t0011",
9292
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
@@ -167,7 +167,7 @@
167167
"input": "frame-0020-in.jsonld",
168168
"frame": "frame-0020-frame.jsonld",
169169
"expect": "frame-0020-out.jsonld",
170-
"option": {"pruneBlankNodeIdentifiers": false}
170+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
171171
}, {
172172
"@id": "#t0021",
173173
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
@@ -176,7 +176,7 @@
176176
"input": "frame-0021-in.jsonld",
177177
"frame": "frame-0021-frame.jsonld",
178178
"expect": "frame-0021-out.jsonld",
179-
"option": {"pruneBlankNodeIdentifiers": false}
179+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
180180
}, {
181181
"@id": "#t0022",
182182
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
@@ -400,7 +400,7 @@
400400
"input": "frame-0046-in.jsonld",
401401
"frame": "frame-0046-frame.jsonld",
402402
"expect": "frame-0046-out.jsonld",
403-
"option": {"pruneBlankNodeIdentifiers": false, "specVersion": "json-ld-1.1"}
403+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
404404
}, {
405405
"@id": "#t0047",
406406
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
@@ -427,7 +427,7 @@
427427
"input": "frame-0049-in.jsonld",
428428
"frame": "frame-0049-frame.jsonld",
429429
"expect": "frame-0049-out.jsonld",
430-
"option": {"pruneBlankNodeIdentifiers": false, "specVersion": "json-ld-1.1"}
430+
"option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
431431
}, {
432432
"@id": "#t0050",
433433
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
@@ -571,6 +571,15 @@
571571
"frame": "frame-0049-frame.jsonld",
572572
"expect": "frame-p049-out.jsonld",
573573
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
574+
}, {
575+
"@id": "#tp050",
576+
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
577+
"name": "Prune blank nodes with alias of @id",
578+
"purpose": "If @id is aliased in a frame, an unreferenced blank node is still pruned.",
579+
"input": "frame-p050-in.jsonld",
580+
"frame": "frame-p050-frame.jsonld",
581+
"expect": "frame-p050-out.jsonld",
582+
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
574583
}
575584
]
576585
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"id": "@id"
5+
},
6+
"id": {},
7+
"name": {}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"id": "@id"
5+
},
6+
"id": "_:bnode0",
7+
"name": "foo"
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"id": "@id"
5+
},
6+
"@graph": [{"name": "foo"}]
7+
}

0 commit comments

Comments
 (0)