diff --git a/Gemfile.lock b/Gemfile.lock
index f8b7428c..3cea9e32 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/ruby-rdf/json-ld.git
- revision: afe7b3b10547b552676d1379a2be4bc34cf83d02
+ revision: 6bb0c2d269e8cf80152d519ee5fd16696812b1f2
branch: develop
specs:
json-ld (3.0.2)
@@ -12,7 +12,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- addressable (2.5.2)
+ addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
bcp47 (0.3.3)
i18n
@@ -31,7 +31,7 @@ GEM
hamster (3.0.0)
concurrent-ruby (~> 1.0)
htmlentities (4.3.4)
- i18n (1.5.1)
+ i18n (1.5.3)
concurrent-ruby (~> 1.0)
json-ld-preloaded (3.0.2)
json-ld (~> 3.0)
@@ -73,14 +73,14 @@ GEM
multi_json (1.13.1)
net-http-persistent (3.0.0)
connection_pool (~> 2.2)
- nokogiri (1.10.0)
+ nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
nokogumbo (1.5.0)
nokogiri
public_suffix (3.0.3)
rack (2.0.6)
rake (12.3.2)
- rdf (3.0.9)
+ rdf (3.0.10)
hamster (~> 3.0)
link_header (~> 0.0, >= 0.0.8)
rdf-aggregate-repo (2.2.1)
@@ -126,7 +126,7 @@ GEM
rdf-turtle (~> 3.0, >= 3.0.3)
rdf-trix (2.2.1)
rdf (>= 2.2, < 4.0)
- rdf-turtle (3.0.3)
+ rdf-turtle (3.0.5)
ebnf (~> 1.1)
rdf (~> 3.0)
rdf-vocab (3.0.4)
diff --git a/Rakefile b/Rakefile
index e14cf9c7..94d4d38e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,4 @@
+require 'bundler/setup'
task default: :test
desc "Test examples in spec files"
diff --git a/common/terms.html b/common/terms.html
index d3aa9851..fc58f1c5 100644
--- a/common/terms.html
+++ b/common/terms.html
@@ -112,6 +112,16 @@
Whenever possible, an edge should be labeled with an IRI.
The use of
blank node identifiers to label properties is obsolete,
and may be removed in a future version of JSON-LD.
+ embedded context
+ An embedded context is a dictionary composed of a combintation of
+ term definitions, a vocabulary mapping, a base IRI and default language.
+ An embedded context may appear as part of a node object or value object using the
+ @context
member.
+
+ scoped context
+ A scoped context is part of an expanded term definition using the
+ @context
member. It has the same form as an embedded context.
+
expanded term definition
An expanded term definition is a term definition
where the value is a dictionary
@@ -150,7 +160,8 @@
is a graph object which does not have an @id
member.
Note that node objects may have a @graph
member,
but are not considered graph objects if they include any other members.
- A top-level object consisting of @graph
is also not a graph object.
+ A top-level object consisting of @graph
is also not a graph object.
+ Note that a node object may also represent a named graph it it includes other properties.
index map
An index map is a dictionary value of a term
defined with @container
set to @index
,
@@ -212,7 +223,8 @@
A list is an ordered sequence of IRIs, blank nodes, and JSON-LD values.
See RDF collection in [[RDF-SCHEMA]].
list object
- A list object is a dictionary that has a @list
key.
+ A list object is a dictionary that has a @list
key.
+ It may also have an @index
key, but no other members.
literal
An object expressed as a value such as a string, number or in expanded form.
local context
@@ -294,7 +306,8 @@
are resolved relative to the vocabulary mapping,
not the base IRI.
set object
- A set object is a dictionary that has an @set
member.
+ A set object is a dictionary that has an @set
member.
+ It may also have an @index
key, but no other members.
subject
A subject
is a node in a linked data graph
diff --git a/index.html b/index.html
index 6b1dd437..4d0a5793 100644
--- a/index.html
+++ b/index.html
@@ -1030,8 +1030,9 @@ Algorithm
characters are treated in URI references, per
section 6.5
of [[RFC3987]].
- If context is in the remote contexts array, a
- recursive context inclusion
+ If the number of entries in the remote contexts array
+ exceeds a processor defined limit, a
+ context overflow
error has been detected and processing is aborted;
otherwise, add context to remote contexts.
If context was previously dereferenced,
@@ -5437,7 +5438,7 @@ JsonLdErrorCode
"loading remote context failed",
"multiple context link headers",
"processing mode conflict",
- "recursive context inclusion"
+ "context overflow"
};
-->
@@ -5551,8 +5552,8 @@ JsonLdErrorCode
processing mode conflict
An attempt was made to change the processing mode
which is incompatible with the previous specified version.
- recursive context inclusion
- A cycle in remote context inclusions has been detected.
+ context overflow
+ maximum number of @context
URLs exceeded.
@@ -5680,6 +5681,8 @@ Changes since JSON-LD Community Group Final Report
or all JSON-LD script elements.
Added contentType field to RemoteDocument.
Added support for sealed contexts and term definitions.
+ Because scoped contexts can lead to contexts being reloaded, replace the
+ recursive context inclusion error with a context overflow error.
diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld
index 36a73c98..098b620d 100644
--- a/tests/expand-manifest.jsonld
+++ b/tests/expand-manifest.jsonld
@@ -932,14 +932,16 @@
"name": "A context may not include itself recursively (direct)",
"purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself",
"input": "expand/e002-in.jsonld",
- "expect": "recursive context inclusion"
+ "expect": "recursive context inclusion",
+ "option": {"specVersion": "json-ld-1.0"}
}, {
"@id": "#te003",
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
"name": "A context may not include itself recursively (indirect)",
"purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself indirectly",
"input": "expand/e003-in.jsonld",
- "expect": "recursive context inclusion"
+ "expect": "recursive context inclusion",
+ "option": {"specVersion": "json-ld-1.0"}
}, {
"@id": "#te004",
"@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],