diff --git a/index.html b/index.html
index 730a7ee3..b7834458 100644
--- a/index.html
+++ b/index.html
@@ -1664,10 +1664,10 @@
Algorithm
Set the term definition of term in
active context to definition and the
value associated with defined's entry term to
- true
and return.
+ true
.
- If value contains the entry @id
and its value
+ Otherwise, if value contains the entry @id
and its value
does not equal term:
- If the
@id
entry of value
@@ -7109,6 +7109,12 @@ Changes since Recommendation of 16 July 2020
Compaction Algorithm
step 12.8.9.6.1 to first expand
container key before compacting it.
+ -
+ Changed the Create Term Definition
+ in section 4.2 of the Context Processing Algorithms, to ensure that all
+ possible features for reverse term definitions are processed. The change
+ was to remove
and return
from the end of step 13, and revise step
+ 14 to begin with Otherwise
.
+-
+Test t0114 Reverse term with property based indexed container
+
+-
+
+- id
+- #t0114
+- Type
+- jld:PositiveEvaluationTest, jld:CompactTest
+- Purpose
+- Compaction using a reverse term with @container indexed on a property (round-trip test of expand#t0131)
+- input
+-
+compact/0114-in.jsonld
+
+- context
+-
+compact/0114-context.jsonld
+
+- expect
+-
+compact/0114-out.jsonld
+
+- Options
+-
+
+- base
+- https://example.org/
+- specVersion
+- json-ld-1.1
+
+
+
+
-
Test tc001 adding new term
diff --git a/tests/compact-manifest.jsonld b/tests/compact-manifest.jsonld
index c0c429ac..54fe6a12 100644
--- a/tests/compact-manifest.jsonld
+++ b/tests/compact-manifest.jsonld
@@ -957,6 +957,15 @@
"input": "compact/0113-in.jsonld",
"context": "compact/0113-context.jsonld",
"expect": "compact/0113-out.jsonld"
+ }, {
+ "@id": "#t0114",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Reverse term with property based indexed container",
+ "purpose": "Compaction using a reverse term with @container indexed on a property (round-trip test of expand#t0131)",
+ "input": "compact/0114-in.jsonld",
+ "context": "compact/0114-context.jsonld",
+ "expect": "compact/0114-out.jsonld",
+ "option": {"base": "https://example.org/", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
diff --git a/tests/compact/0114-context.jsonld b/tests/compact/0114-context.jsonld
new file mode 100644
index 00000000..7facc291
--- /dev/null
+++ b/tests/compact/0114-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "https://example.org/",
+ "@vocab": "https://example.net/ns#",
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ "statement": {"@reverse": "rdf:subject", "@container": "@index", "@index": "predicate"},
+ "predicate": {"@id": "rdf:predicate", "@type": "@vocab"},
+ "term": {"@id": "rdf:object", "@type": "@vocab"},
+ "addedIn": {"@type": "@id"}
+ }
+}
diff --git a/tests/compact/0114-in.jsonld b/tests/compact/0114-in.jsonld
new file mode 100644
index 00000000..a1113421
--- /dev/null
+++ b/tests/compact/0114-in.jsonld
@@ -0,0 +1,26 @@
+[
+ {
+ "@id": "https://example.org/item/1",
+ "@reverse": {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject": [
+ {
+ "https://example.net/ns#addedIn": [
+ {
+ "@id": "https://example.org/v1"
+ }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#object": [
+ {
+ "@id": "https://example.net/ns#A"
+ }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate": [
+ {
+ "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/tests/compact/0114-out.jsonld b/tests/compact/0114-out.jsonld
new file mode 100644
index 00000000..de7969bb
--- /dev/null
+++ b/tests/compact/0114-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "https://example.org/",
+ "@vocab": "https://example.net/ns#",
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ "statement": {"@reverse": "rdf:subject", "@container": "@index", "@index": "predicate"},
+ "predicate": {"@id": "rdf:predicate", "@type": "@vocab"},
+ "term": {"@id": "rdf:object", "@type": "@vocab"},
+ "addedIn": {"@type": "@id"}
+ },
+ "@id": "item/1",
+ "statement": {
+ "rdf:type": {"term": "A", "addedIn": "v1"}
+ }
+}
diff --git a/tests/expand-manifest.html b/tests/expand-manifest.html
index a1b2fea9..61fc01d7 100644
--- a/tests/expand-manifest.html
+++ b/tests/expand-manifest.html
@@ -3215,6 +3215,34 @@
+-
+Test t0131 Reverse term with property based indexed container
+
+-
+
+- id
+- #t0131
+- Type
+- jld:PositiveEvaluationTest, jld:ExpandTest
+- Purpose
+- Expanding a reverse term using @container: @index and @index set to a property
+- input
+-
+expand/0131-in.jsonld
+
+- expect
+-
+expand/0131-out.jsonld
+
+- Options
+-
+
+- specVersion
+- json-ld-1.1
+
+
+
+
-
Test tc001 adding new term
diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld
index 57bc6b85..9f66743d 100644
--- a/tests/expand-manifest.jsonld
+++ b/tests/expand-manifest.jsonld
@@ -978,6 +978,14 @@
"purpose": "Verify URI resolution relative to base (without trailing slash, with path) according to RFC 3986",
"input": "expand/0130-in.jsonld",
"expect": "expand/0130-out.jsonld"
+ }, {
+ "@id": "#t0131",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "Reverse term with property based indexed container",
+ "purpose": "Expanding a reverse term using @container: @index and @index set to a property",
+ "input": "expand/0131-in.jsonld",
+ "expect": "expand/0131-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
diff --git a/tests/expand/0131-in.jsonld b/tests/expand/0131-in.jsonld
new file mode 100644
index 00000000..de7969bb
--- /dev/null
+++ b/tests/expand/0131-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "https://example.org/",
+ "@vocab": "https://example.net/ns#",
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ "statement": {"@reverse": "rdf:subject", "@container": "@index", "@index": "predicate"},
+ "predicate": {"@id": "rdf:predicate", "@type": "@vocab"},
+ "term": {"@id": "rdf:object", "@type": "@vocab"},
+ "addedIn": {"@type": "@id"}
+ },
+ "@id": "item/1",
+ "statement": {
+ "rdf:type": {"term": "A", "addedIn": "v1"}
+ }
+}
diff --git a/tests/expand/0131-out.jsonld b/tests/expand/0131-out.jsonld
new file mode 100644
index 00000000..a1113421
--- /dev/null
+++ b/tests/expand/0131-out.jsonld
@@ -0,0 +1,26 @@
+[
+ {
+ "@id": "https://example.org/item/1",
+ "@reverse": {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject": [
+ {
+ "https://example.net/ns#addedIn": [
+ {
+ "@id": "https://example.org/v1"
+ }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#object": [
+ {
+ "@id": "https://example.net/ns#A"
+ }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate": [
+ {
+ "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/tests/toRdf-manifest.html b/tests/toRdf-manifest.html
index dfc0aced..76d65d00 100644
--- a/tests/toRdf-manifest.html
+++ b/tests/toRdf-manifest.html
@@ -1270,6 +1270,27 @@
+-
+Test t0133 Reverse term with property based indexed container
+
+-
+
+- id
+- #t0133
+- Type
+- jld:PositiveEvaluationTest, jld:ToRDFTest
+- Purpose
+- Expanding a reverse term using @container: @index and @index set to a property (from expand#t0131)
+- input
+-
+toRdf/0133-in.jsonld
+
+- expect
+-
+toRdf/0133-out.nq
+
+
+
-
Test tc001 adding new term
diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld
index e13eab49..a971456e 100644
--- a/tests/toRdf-manifest.jsonld
+++ b/tests/toRdf-manifest.jsonld
@@ -396,6 +396,13 @@
"purpose": "IRI resolution according to RFC3986.",
"input": "toRdf/0132-in.jsonld",
"expect": "toRdf/0132-out.nq"
+ }, {
+ "@id": "#t0133",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
+ "name": "Reverse term with property based indexed container",
+ "purpose": "Expanding a reverse term using @container: @index and @index set to a property (from expand#t0131)",
+ "input": "toRdf/0133-in.jsonld",
+ "expect": "toRdf/0133-out.nq"
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
diff --git a/tests/toRdf/0133-in.jsonld b/tests/toRdf/0133-in.jsonld
new file mode 100644
index 00000000..a1113421
--- /dev/null
+++ b/tests/toRdf/0133-in.jsonld
@@ -0,0 +1,26 @@
+[
+ {
+ "@id": "https://example.org/item/1",
+ "@reverse": {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject": [
+ {
+ "https://example.net/ns#addedIn": [
+ {
+ "@id": "https://example.org/v1"
+ }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#object": [
+ {
+ "@id": "https://example.net/ns#A"
+ }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate": [
+ {
+ "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/tests/toRdf/0133-out.nq b/tests/toRdf/0133-out.nq
new file mode 100644
index 00000000..caee8969
--- /dev/null
+++ b/tests/toRdf/0133-out.nq
@@ -0,0 +1,4 @@
+_:b0 .
+_:b0 .
+_:b0 .
+_:b0 .