diff --git a/index.html b/index.html
index 49cde345..bf68cd30 100644
--- a/index.html
+++ b/index.html
@@ -1695,9 +1695,13 @@
Algorithm
Context Processing.
If active context contains a term definition
for prefix
- having a non-null
IRI mapping,
+ having a non-null
IRI mapping
+ and the prefix flag of the term definition is true
,
return the result of concatenating the IRI mapping
- associated with prefix and suffix.
+ associated with prefix and suffix.
+ A more conservative change, although more involved,
+ would to restrict looking at the prefix flag unless
+ the processing mode is json-ld-1.1
.
If value has the form of an absolute IRI,
return value.
diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld
index ac778172..a34b5649 100644
--- a/tests/expand-manifest.jsonld
+++ b/tests/expand-manifest.jsonld
@@ -271,7 +271,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"},
+ "option": {"specVersion": "json-ld-1.0"},
"input": "expand/0038-in.jsonld",
"expect": "expand/0038-out.jsonld"
}, {
@@ -2347,6 +2347,14 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "expand/pr28-in.jsonld",
"expect": "protected term redefinition"
+ }, {
+ "@id": "#tpr29",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Does not expand a Compact IRI using a non-prefix term.",
+ "purpose": "Expansion of Compact IRIs considers if the term can be used as a prefix.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr29-in.jsonld",
+ "expect": "expand/pr29-out.jsonld"
}, {
"@id": "#ttn01",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
diff --git a/tests/expand/0014-in.jsonld b/tests/expand/0014-in.jsonld
index ba913ff2..f10b39a5 100644
--- a/tests/expand/0014-in.jsonld
+++ b/tests/expand/0014-in.jsonld
@@ -13,7 +13,7 @@
"set": "@set",
"value": "@value",
"type": "@type",
- "xsd": { "@id": "http://www.w3.org/2001/XMLSchema#" }
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
},
"property1": {
"uri": "ex:example2",
diff --git a/tests/expand/0048-in.jsonld b/tests/expand/0048-in.jsonld
index 005f5e16..5854b8a0 100644
--- a/tests/expand/0048-in.jsonld
+++ b/tests/expand/0048-in.jsonld
@@ -1,7 +1,7 @@
{
"@context": {
"term": "http://example.com/terms-are-not-considered-in-id",
- "compact-iris": "http://example.com/compact-iris-",
+ "compact-iris": "http://example.com/compact-iris#",
"property": "http://example.com/property",
"@vocab": "http://example.org/vocab-is-not-considered-for-id"
},
diff --git a/tests/expand/0048-out.jsonld b/tests/expand/0048-out.jsonld
index 92094756..da0a5bac 100644
--- a/tests/expand/0048-out.jsonld
+++ b/tests/expand/0048-out.jsonld
@@ -3,7 +3,7 @@
"@id": "https://w3c.github.io/json-ld-api/tests/expand/term",
"http://example.com/property": [
{
- "@id": "http://example.com/compact-iris-are-considered",
+ "@id": "http://example.com/compact-iris#are-considered",
"http://example.com/property": [
{ "@value": "@id supports the following values: relative, absolute, and compact IRIs" }
]
diff --git a/tests/expand/pr29-in.jsonld b/tests/expand/pr29-in.jsonld
new file mode 100644
index 00000000..e49e6c69
--- /dev/null
+++ b/tests/expand/pr29-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "tag": {"@id": "http://example.org/ns/tag/", "@prefix": false}
+ },
+ "tag:champin.net,2019:prop": "This is not treated as a Compact IRI",
+ "tag": "tricky"
+}
diff --git a/tests/expand/pr29-out.jsonld b/tests/expand/pr29-out.jsonld
new file mode 100644
index 00000000..fe204c1d
--- /dev/null
+++ b/tests/expand/pr29-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "http://example.org/ns/tag/": [
+ {
+ "@value": "tricky"
+ }
+ ]
+ },
+ {
+ "tag:champin.net,2019:prop": [
+ {
+ "@value": "This is not treated as a Compact IRI"
+ }
+ ]
+ }
+]
diff --git a/tests/flatten-manifest.jsonld b/tests/flatten-manifest.jsonld
index 10956442..5872b947 100644
--- a/tests/flatten-manifest.jsonld
+++ b/tests/flatten-manifest.jsonld
@@ -103,7 +103,8 @@
"name": "@set of @value objects with keyword aliases",
"purpose": "Flattening aliased @set and @value",
"input": "flatten/0014-in.jsonld",
- "expect": "flatten/0014-out.jsonld"
+ "expect": "flatten/0014-out.jsonld",
+ "option": {"specVersion": "json-ld-1.0"}
}, {
"@id": "#t0015",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
@@ -264,7 +265,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"},
+ "option": {"specVersion": "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 51c2a4ce..1b60ec72 100644
--- a/tests/toRdf-manifest.jsonld
+++ b/tests/toRdf-manifest.jsonld
@@ -348,7 +348,8 @@
"name": "@set of @value objects with keyword aliases",
"purpose": "RDF version of expand-0014",
"input": "toRdf/0054-in.jsonld",
- "expect": "toRdf/0054-out.nq"
+ "expect": "toRdf/0054-out.nq",
+ "option": {"specVersion": "json-ld-1.0"}
}, {
"@id": "#t0055",
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
diff --git a/tests/toRdf/0088-in.jsonld b/tests/toRdf/0088-in.jsonld
index 005f5e16..5854b8a0 100644
--- a/tests/toRdf/0088-in.jsonld
+++ b/tests/toRdf/0088-in.jsonld
@@ -1,7 +1,7 @@
{
"@context": {
"term": "http://example.com/terms-are-not-considered-in-id",
- "compact-iris": "http://example.com/compact-iris-",
+ "compact-iris": "http://example.com/compact-iris#",
"property": "http://example.com/property",
"@vocab": "http://example.org/vocab-is-not-considered-for-id"
},
diff --git a/tests/toRdf/0088-out.nq b/tests/toRdf/0088-out.nq
index b8542727..94324d9d 100644
--- a/tests/toRdf/0088-out.nq
+++ b/tests/toRdf/0088-out.nq
@@ -1,4 +1,4 @@
- "@id supports the following values: relative, absolute, and compact IRIs" .
+ "@id supports the following values: relative, absolute, and compact IRIs" .
"relative IRIs get resolved against the document's base IRI" .
- .
+ .
.