The use of
blank node identifiers to value for
@vocab
is obsolete,
@@ -5520,7 +5524,7 @@
JsonLdErrorCode
i.e., it is neither a
scalar nor
null
.
invalid vocab mapping
An invalid vocabulary mapping has been detected,
- i.e., it is neither an absolute IRI nor null
.
+ i.e., it is neither an
IRI nor
null
.
keyword redefinition
A keyword redefinition has been detected.
loading document failed
diff --git a/tests/compact-manifest.jsonld b/tests/compact-manifest.jsonld
index d99be60e..660249c6 100644
--- a/tests/compact-manifest.jsonld
+++ b/tests/compact-manifest.jsonld
@@ -616,7 +616,7 @@
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "Compact using relative fragment identifier",
"purpose": "Compacting a relative round-trips",
- "option": {"base": "http://example.org/"},
+ "option": {"processingMode": "json-ld-1.0", "base": "http://example.org/"},
"input": "compact/0075-in.jsonld",
"context": "compact/0075-context.jsonld",
"expect": "compact/0075-out.jsonld"
@@ -896,6 +896,14 @@
"context": "compact/0106-context.jsonld",
"expect": "compact/0106-out.jsonld",
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0107",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Relative propererty IRIs with @vocab: ''",
+ "purpose": "Complex use cases for relative IRI compaction or properties",
+ "input": "compact/0107-in.jsonld",
+ "context": "compact/0107-context.jsonld",
+ "expect": "compact/0107-out.jsonld"
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
diff --git a/tests/compact/0107-context.jsonld b/tests/compact/0107-context.jsonld
new file mode 100644
index 00000000..9a7115dd
--- /dev/null
+++ b/tests/compact/0107-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/",
+ "@vocab": "other/"
+ }
+}
diff --git a/tests/compact/0107-in.jsonld b/tests/compact/0107-in.jsonld
new file mode 100644
index 00000000..13505e4b
--- /dev/null
+++ b/tests/compact/0107-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/relativePropertyIris",
+ "http://example.com/absolute": [{"@value": "/absolute"}],
+ "http://example.com/some/other/deep/directory/": [{"@value": "deep/directory"}],
+ "http://example.com/some/other/deep/directory/and/": [{"@value": "deep/directory/and/"}],
+ "http://example.com/some/other/#fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/some/other/?query=works": [{"@value": "?query=works"}],
+ "http://example.com/some/other/link": [{"@value": "link"}],
+ "http://example.com/some/other/../parent": [{"@value": "../parent"}],
+ "http://example.com/too-many-dots": [{"@value": "too-many-dots"}]
+ }
+]
diff --git a/tests/compact/0107-out.jsonld b/tests/compact/0107-out.jsonld
new file mode 100644
index 00000000..7b9f8838
--- /dev/null
+++ b/tests/compact/0107-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/",
+ "@vocab": "other/"
+ },
+ "#fragment-works": "#fragment-works",
+ "../parent": "../parent",
+ "?query=works": "?query=works",
+ "@id": "deep/directory/and/relativePropertyIris",
+ "deep/directory/": "deep/directory",
+ "deep/directory/and/": "deep/directory/and/",
+ "http://example.com/absolute": "/absolute",
+ "http://example.com/too-many-dots": "too-many-dots",
+ "link": "link"
+}
\ No newline at end of file
diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld
index 5facfbd8..32abb3d1 100644
--- a/tests/expand-manifest.jsonld
+++ b/tests/expand-manifest.jsonld
@@ -270,6 +270,7 @@
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expanding blank node labels",
"purpose": "Blank nodes are not relabeled during expansion",
+ "option": {"processingMode": "json-ld-1.0"},
"input": "expand/0038-in.jsonld",
"expect": "expand/0038-out.jsonld"
}, {
@@ -528,6 +529,7 @@
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "@vocab as blank node identifier",
"purpose": "Use @vocab to map all properties to blank node identifiers",
+ "option": {"processingMode": "json-ld-1.0"},
"input": "expand/0075-in.jsonld",
"expect": "expand/0075-out.jsonld"
}, {
@@ -808,6 +810,27 @@
"purpose": "Do not treat as absolute IRIs values that look like compact IRIs if they're not absolute",
"input": "expand/0109-in.jsonld",
"expect": "expand/0109-out.jsonld"
+ }, {
+ "@id": "#t0110",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with relative @vocab",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0110-in.jsonld",
+ "expect": "expand/0110-out.jsonld"
+ }, {
+ "@id": "#t0111",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with relative @vocab itself relative to an existing vocabulary base",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0111-in.jsonld",
+ "expect": "expand/0111-out.jsonld"
+ }, {
+ "@id": "#t0112",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with relative @vocab relative to another relative vocabulary base",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0112-in.jsonld",
+ "expect": "expand/0112-out.jsonld"
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
diff --git a/tests/expand/0110-in.jsonld b/tests/expand/0110-in.jsonld
new file mode 100644
index 00000000..a6f1e676
--- /dev/null
+++ b/tests/expand/0110-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "/relative"
+ },
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/tests/expand/0110-out.jsonld b/tests/expand/0110-out.jsonld
new file mode 100644
index 00000000..c93ab5ea
--- /dev/null
+++ b/tests/expand/0110-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/relative#fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/relative../": [{"@value": "../"}],
+ "http://example.com/relative../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/relative../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/relative../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/relative../parent": [{"@value": "../parent"}],
+ "http://example.com/relative./": [{"@value": "./"}],
+ "http://example.com/relative//example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/relative/absolute": [{"@value": "/absolute"}],
+ "http://example.com/relative?query=works": [{"@value": "?query=works"}],
+ "http://example.com/relativelink": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/tests/expand/0111-in.jsonld b/tests/expand/0111-in.jsonld
new file mode 100644
index 00000000..5a0a1178
--- /dev/null
+++ b/tests/expand/0111-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": [{
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "http://example.com/vocabulary/"
+ }, {
+ "@vocab": "./rel2#"
+ }],
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/tests/expand/0111-out.jsonld b/tests/expand/0111-out.jsonld
new file mode 100644
index 00000000..8febce3b
--- /dev/null
+++ b/tests/expand/0111-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/vocabulary/./rel2##fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/vocabulary/./rel2#../": [{"@value": "../"}],
+ "http://example.com/vocabulary/./rel2#../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/vocabulary/./rel2#../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/vocabulary/./rel2#../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/vocabulary/./rel2#../parent": [{"@value": "../parent"}],
+ "http://example.com/vocabulary/./rel2#./": [{"@value": "./"}],
+ "http://example.com/vocabulary/./rel2#//example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/vocabulary/./rel2#/absolute": [{"@value": "/absolute"}],
+ "http://example.com/vocabulary/./rel2#?query=works": [{"@value": "?query=works"}],
+ "http://example.com/vocabulary/./rel2#link": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/tests/expand/0112-in.jsonld b/tests/expand/0112-in.jsonld
new file mode 100644
index 00000000..273eebdd
--- /dev/null
+++ b/tests/expand/0112-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": [{
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "/rel1"
+ }, {
+ "@vocab": "./rel2#"
+ }],
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/tests/expand/0112-out.jsonld b/tests/expand/0112-out.jsonld
new file mode 100644
index 00000000..07fe15c4
--- /dev/null
+++ b/tests/expand/0112-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/rel1./rel2##fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/rel1./rel2#../": [{"@value": "../"}],
+ "http://example.com/rel1./rel2#../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/rel1./rel2#../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/rel1./rel2#../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/rel1./rel2#../parent": [{"@value": "../parent"}],
+ "http://example.com/rel1./rel2#./": [{"@value": "./"}],
+ "http://example.com/rel1./rel2#//example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/rel1./rel2#/absolute": [{"@value": "/absolute"}],
+ "http://example.com/rel1./rel2#?query=works": [{"@value": "?query=works"}],
+ "http://example.com/rel1./rel2#link": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/tests/flatten-manifest.jsonld b/tests/flatten-manifest.jsonld
index be4c3dcb..56b066af 100644
--- a/tests/flatten-manifest.jsonld
+++ b/tests/flatten-manifest.jsonld
@@ -263,6 +263,7 @@
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Flattening blank node labels",
"purpose": "Blank nodes are not relabeled during expansion",
+ "option": {"processingMode": "json-ld-1.0"},
"input": "flatten/0038-in.jsonld",
"expect": "flatten/0038-out.jsonld"
}, {
diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld
index 6a9ab44c..cfac6926 100644
--- a/tests/toRdf-manifest.jsonld
+++ b/tests/toRdf-manifest.jsonld
@@ -515,6 +515,7 @@
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
"name": "Drop blank node predicates by default",
"purpose": "Triples with blank node predicates are dropped by default.",
+ "option": {"processingMode": "json-ld-1.0"},
"input": "toRdf/0078-in.jsonld",
"expect": "toRdf/0078-out.nq"
}, {
@@ -796,6 +797,7 @@
"name": "produce generalized RDF flag",
"purpose": "Triples with blank node predicates are not dropped if the produce generalized RDF flag is true.",
"option": {
+ "processingMode": "json-ld-1.0",
"produceGeneralizedRdf": true
},
"input": "toRdf/0118-in.jsonld",