Skip to content

Commit 43dfbfb

Browse files
committed
Update text on vocabulary mapping and @vocab to allow relative IRIs, which are resolved relative to the base IRI. This subsumes the previous usage of allowing just the empty string.
1 parent 6f92b1d commit 43dfbfb

File tree

3 files changed

+32
-27
lines changed

3 files changed

+32
-27
lines changed

Gemfile.lock

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
GIT
22
remote: git://github.com/ruby-rdf/json-ld.git
3-
revision: a26c3205d006550f85162848a4a2bc3366b39970
3+
revision: cee48fd9f71fcf51bca0512d4d8ea36d1d292459
44
branch: develop
55
specs:
66
json-ld (3.0.2)
7+
link_header (~> 0.0, >= 0.0.8)
78
multi_json (~> 1.13)
8-
rdf (~> 3.0, >= 3.0.4)
9+
rack (>= 1.6, < 3.0)
10+
rdf (~> 3.0, >= 3.0.8)
911

1012
GEM
1113
remote: https://rubygems.org/
@@ -16,7 +18,7 @@ GEM
1618
i18n
1719
builder (3.2.3)
1820
colorize (0.8.1)
19-
concurrent-ruby (1.1.3)
21+
concurrent-ruby (1.1.4)
2022
connection_pool (2.2.2)
2123
ebnf (1.1.3)
2224
rdf (~> 3.0)
@@ -29,7 +31,7 @@ GEM
2931
hamster (3.0.0)
3032
concurrent-ruby (~> 1.0)
3133
htmlentities (4.3.4)
32-
i18n (1.1.1)
34+
i18n (1.5.1)
3335
concurrent-ruby (~> 1.0)
3436
json-ld-preloaded (3.0.2)
3537
json-ld (~> 3.0)
@@ -67,17 +69,18 @@ GEM
6769
shex (~> 0.5, >= 0.5.2)
6870
sparql (~> 3.0)
6971
sparql-client (~> 3.0)
70-
mini_portile2 (2.3.0)
72+
mini_portile2 (2.4.0)
7173
multi_json (1.13.1)
7274
net-http-persistent (3.0.0)
7375
connection_pool (~> 2.2)
74-
nokogiri (1.8.5)
75-
mini_portile2 (~> 2.3.0)
76+
nokogiri (1.10.0)
77+
mini_portile2 (~> 2.4.0)
7678
nokogumbo (1.5.0)
7779
nokogiri
7880
public_suffix (3.0.3)
81+
rack (2.0.6)
7982
rake (12.3.2)
80-
rdf (3.0.7)
83+
rdf (3.0.9)
8184
hamster (~> 3.0)
8285
link_header (~> 0.0, >= 0.0.8)
8386
rdf-aggregate-repo (2.2.1)
@@ -166,4 +169,4 @@ DEPENDENCIES
166169
rake
167170

168171
BUNDLED WITH
169-
1.17.1
172+
1.17.3

common/terms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,5 +335,5 @@
335335
A <a>value object</a> is a <a>dictionary</a> that has an <code>@value</code> <a>member</a>.</dd>
336336
<dt><dfn>vocabulary mapping</dfn></dt><dd>
337337
The vocabulary mapping is set in the <a>context</a> using the <code>@vocab</code> key
338-
whose value MUST be an <a>absolute IRI</a> or <code>null</code>.</dd>
338+
whose value MUST be an <a>IRI</a> or <code>null</code>.</dd>
339339
</dl>

index.html

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,28 +2164,29 @@ <h1>Advanced Concepts</h1>
21642164
</aside>
21652165

21662166
<section class="changed">
2167-
<h3>Using the Document Base as the Default Vocabulary</h3>
2167+
<h3>Using the Document Base for the Default Vocabulary</h3>
21682168
<p>In some cases, vocabulary terms are defined directly within the document
2169-
itself, rather than in an external vocabulary. Since
2170-
<code>json-ld-1.1</code>, the <a>vocabulary mapping</a> in the <a>active
2171-
context</a> can be set to the empty string <code>&quot;&quot;</code>, which causes terms which
2172-
are expanded relative to the vocabulary, such as the keys of <a>node
2173-
objects</a>, to use the <a>base IRI</a> to create <a>absolute
2174-
IRIs</a>.</p>
2169+
itself, rather than in an external vocabulary.
2170+
Since <code>json-ld-1.1</code>, the <a>vocabulary mapping</a> in the <a>active context</a>
2171+
can be set to the a <a>relative IRI</a>,
2172+
which is, itself, resolved against the <a>base IRI</a>.
2173+
This causes terms which are expanded relative to the vocabulary,
2174+
such as the keys of <a>node objects</a>,
2175+
to be based on the <a>base IRI</a> to create <a>absolute IRIs</a>.</p>
21752176

21762177
<pre class="example nohighlight" data-transform="updateExample"
2177-
title="Using &quot;&quot; as the vocabulary mapping"
2178+
title="Using &quot;#&quot; as the vocabulary mapping"
21782179
data-base="http://example/document">
21792180
<!--
21802181
{
21812182
"@context": {
21822183
****"@version": 1.1,****
21832184
****"@base": "http://example/document",****
2184-
"@vocab": ****""****
2185+
"@vocab": ****"#"****
21852186
},
21862187
"@id": "http://example.org/places#BrewEats",
2187-
"@type": ****"#Restaurant"****,
2188-
****"#name"****: "Brew Eats"
2188+
"@type": ****"Restaurant"****,
2189+
****"name"****: "Brew Eats"
21892190
####...####
21902191
}
21912192
-->
@@ -9658,7 +9659,7 @@ <h2>Context Definitions</h2>
96589659
<p>If the <a>context definition</a> has an <code>@vocab</code> key,
96599660
its value MUST be a <a>absolute IRI</a>, a <a>compact IRI</a>,
96609661
a <a>blank node identifier</a>,
9661-
<span class="changed">an empty string (<code>&quot;&quot;</code>)</span>,
9662+
<span class="changed">a <a>relative IRI</a></span>,
96629663
a <a>term</a>, or <a>null</a>.</p>
96639664

96649665
<p class="changed">If the <a>context definition</a> has an <code>@version</code> key,
@@ -9916,7 +9917,7 @@ <h2>Keywords</h2>
99169917
<dt><code>@vocab</code></dt><dd>
99179918
The <code>@vocab</code> keyword MUST NOT be aliased and MAY be used as a key in a <a>context definition</a>
99189919
or as the value of <code>@type</code> in an <a>expanded term definition</a>.
9919-
Its value MUST be a <a>absolute IRI</a>, a <a>compact IRI</a>, a <a>blank node identifier</a>, an empty <a>string</a> (""), a <a>term</a>, or <a>null</a>.
9920+
Its value MUST be a <a>absolute IRI</a>, <span class="changed">a <a>relative IRI</a></span>, a <a>compact IRI</a>, a <a>blank node identifier</a>, an empty <a>string</a> (""), a <a>term</a>, or <a>null</a>.
99209921
This keyword is described further in <a class="sectionRef" href="#context-definitions"></a>,
99219922
and <a class="sectionRef" href="#default-vocabulary"></a>.
99229923
</dd>
@@ -9967,7 +9968,7 @@ <h2>Relationship to RDF</h2>
99679968
instead, consider one of the following mechanisms:</p>
99689969
<ul>
99699970
<li>a <a>relative IRI</a>, either relative to the document or the vocabulary
9970-
(see <a href="#using-the-document-base-as-the-default-vocabulary" class="sectionRef"></a> for a discussion on using the document base as the <a>vocabulary mapping</a>).</li>
9971+
(see <a href="#using-the-document-base-for-the-default-vocabulary" class="sectionRef"></a> for a discussion on using the document base as part of the the <a>vocabulary mapping</a>).</li>
99719972
<li>a URN such as <code>urn:example:1</code>, see [[?URN]], or</li>
99729973
<li>a "Skolem IRI" as per
99739974
<a data-cite="RDF11-CONCEPTS#section-skolemization">Replacing Blank Nodes with IRIs</a>
@@ -10633,10 +10634,11 @@ <h2>Changes since 1.0 Recommendation of 16 January 2014</h2>
1063310634
may include <code>"@set"</code>, which create maps from the
1063410635
graph identifier or index value similar to <a>index maps</a>
1063510636
and <a>id maps</a>.</li>
10636-
<li>The empty string (<code>&quot;&quot;</code>) has been added as a possible value for <code>@vocab</code> in
10637-
a context. When this is set, vocabulary-relative IRIs, such as the
10637+
<li>a <a>relative IRI</a> has been added as a possible value for <code>@vocab</code> in
10638+
a context. When this is set, the <a>vocabulary mapping</a> is resolved against
10639+
the <a>base IRI</a>, so that vocabulary-relative IRIs, such as the
1063810640
keys of <a>node objects</a>, are expanded or compacted relative
10639-
to the <a>base IRI</a> using string concatenation.</li>
10641+
to the document base.</li>
1064010642
</ul>
1064110643
<p>Additionally, see <a href="#changes-from-cg" class="sectionRef"></a>.</p>
1064210644
</section>

0 commit comments

Comments
 (0)