Skip to content

Commit 7023fd1

Browse files
committed
Update @source to @import.
1 parent 9bfc306 commit 7023fd1

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
2-
remote: git://github.com/ruby-rdf/json-ld.git
3-
revision: 813e1ff914cc1a1025db14de392fd738b4cbb674
2+
remote: https://github.com/ruby-rdf/json-ld.git
3+
revision: 74095b73cdb722b681f34d0f165599c9cb48d844
44
branch: develop
55
specs:
66
json-ld (3.0.2)
@@ -176,4 +176,4 @@ DEPENDENCIES
176176
rake
177177

178178
BUNDLED WITH
179-
1.17.3
179+
2.0.2

index.html

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ <h2>Syntax Tokens and Keywords</h2>
605605
(other than for type-<a>scoped contexts</a>, which default to `false`).
606606
Setting this to `false` causes term definitions created within that context
607607
to be removed when entering a new <a>node object</a>.</dd>
608-
<dt class="changed">`@source`</dt><dd class="changed">
608+
<dt class="changed">`@import`</dt><dd class="changed">
609609
Used in a <a>context definition</a> to load an external context
610610
within which the containing <a>context definition</a> is merged.
611611
This can be useful to add JSON-LD 1.1 features to JSON-LD 1.0 contexts.</dd>
@@ -3631,7 +3631,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
36313631
due to the way that rollback is defined in [[[JSON-LD11-API]]].</p>
36323632
</section>
36333633

3634-
<section class="informative changed"><h2>Sourced Contexts</h2>
3634+
<section class="informative changed"><h2>Imported Contexts</h2>
36353635
<p>JSON-LD 1.0 included mechanisms for modifying the <a>context</a> that
36363636
is in effect. This included the capability to load and process a remote
36373637
<a>context</a> and then apply further changes to it via new <a>contexts</a>.
@@ -3642,39 +3642,39 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
36423642
1.0 <a>context</a>, and apply JSON-LD 1.1 features to it prior to
36433643
processing.</p>
36443644

3645-
<p>By using the `@source` keyword in a <a>context</a>, another remote
3646-
<a>context</a>, referred to as a sourced <a>context</a>, can be loaded and
3645+
<p>By using the `@import` keyword in a <a>context</a>, another remote
3646+
<a>context</a>, referred to as an imported <a>context</a>, can be loaded and
36473647
modified prior to processing. The modifications are expressed in the
3648-
<a>context</a> that includes the `@source` keyword, referred to as the
3649-
wrapping <a>context</a>. Once a sourced <a>context</a> is loaded, the
3648+
<a>context</a> that includes the `@import` keyword, referred to as the
3649+
wrapping <a>context</a>. Once an imported <a>context</a> is loaded, the
36503650
contents of the wrapping <a>context</a> are merged into it prior to
36513651
processing. The merge operation will cause each key-value pair in the
3652-
wrapping <a>context</a> to be added to the loaded sourced <a>context</a>,
3652+
wrapping <a>context</a> to be added to the loaded imported <a>context</a>,
36533653
with the wrapping <a>context</a> key-value pairs taking precedence.</p>
36543654

36553655
<p>By enabling existing <a>contexts</a> to be reused and edited inline prior
36563656
to processing, context-wide keywords can be applied to adjust all term
3657-
definitions in the sourced <a>context</a>. Similarly, term definitions can
3657+
definitions in the imported <a>context</a>. Similarly, term definitions can
36583658
be replaced prior to processing, enabling adjustments that, for instance, ensure term
36593659
definitions match previously protected terms or that they include
36603660
additional type coercion information.</p>
36613661

3662-
<p>The following examples illustrate how `@source` can be used to express
3663-
a type-scoped <a>context</a> that loads a sourced <a>context</a> and
3662+
<p>The following examples illustrate how `@import` can be used to express
3663+
a type-scoped <a>context</a> that loads an imported <a>context</a> and
36643664
sets `@propagate` to `true` and how to make similar modifications.</p>
36653665

36663666
<p>Suppose there was a <a>context</a> that could be referenced remotely
3667-
via the URL <code>http://example.org/remote-context</code>:</p>
3667+
via the URL <code>https://json-ld.org/contexts/remote-context.jsonld</code>:</p>
36683668

36693669
<pre class="example nohighlight" data-transform="updateExample"
3670-
title="A remote context to be sourced in a type-scoped context">
3670+
title="A remote context to be imported in a type-scoped context">
36713671
<!--
36723672
{
36733673
"@context": {
36743674
"Type1": "http://example.com/vocab/Type1",
36753675
"Type2": "http://example.com/vocab/Type2",
36763676
"term1": "http://example.com/vocab#term1",
3677-
"term2": "http://example.com/vocab#term2",####,
3677+
"term2": "http://example.com/vocab#term2"####,
36783678
...####
36793679
}
36803680
}
@@ -3693,7 +3693,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
36933693
"@id": "http://example.com/vocab#MyType",
36943694
"@context": {
36953695
"@version": 1.1,
3696-
"@source": "https://example.com/remote-context",
3696+
"@import": "https://json-ld.org/contexts/remote-context.jsonld",
36973697
"@propagate": true
36983698
}
36993699
}
@@ -3702,7 +3702,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
37023702
-->
37033703
</pre>
37043704

3705-
<p>The effect would be the same as if the entire sourced <a>context</a>
3705+
<p>The effect would be the same as if the entire imported <a>context</a>
37063706
had been copied into the type-scoped <a>context</a>:</p>
37073707

37083708
<pre class="example nohighlight" data-transform="updateExample"
@@ -3718,7 +3718,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
37183718
"Type1": "http://example.com/vocab/Type1",
37193719
"Type2": "http://example.com/vocab/Type2",
37203720
"term1": "http://example.com/vocab#term1",
3721-
"term2": "http://example.com/vocab#term2",####,
3721+
"term2": "http://example.com/vocab#term2",####
37223722
...####
37233723
"@propagate": true
37243724
}
@@ -3729,7 +3729,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
37293729
</pre>
37303730

37313731
<p>Similarly, the wrapping <a>context</a> may replace term definitions or
3732-
set other context-wide keywords that may effect how the sourced
3732+
set other context-wide keywords that may effect how the imported
37333733
<a>context</a> term definitions will be processed:</p>
37343734

37353735
<pre class="example nohighlight" data-transform="updateExample"
@@ -3738,7 +3738,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
37383738
{
37393739
"@context": {
37403740
"@version": 1.1,
3741-
"@source": "https://example.org/remote-context",
3741+
"@import": "https://json-ld.org/contexts/remote-context.jsonld",
37423742
"@vocab": "http://example.org/vocab#",
37433743
#### ↑ This will replace any previous @vocab definition prior to processing it####
37443744
"term1": {
@@ -3751,7 +3751,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
37513751
-->
37523752
</pre>
37533753

3754-
<p>Again, the effect would be the same as if the entire sourced <a>context</a>
3754+
<p>Again, the effect would be the same as if the entire imported <a>context</a>
37553755
had been copied into the <a>context</a>:</p>
37563756

37573757
<pre class="example nohighlight" data-transform="updateExample"
@@ -3775,7 +3775,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
37753775
-->
37763776
</pre>
37773777

3778-
<p class="note">The result of loading a sourced <a>contexts</a> must be
3778+
<p class="warning">The result of loading imported <a>contexts</a> must be
37793779
an object, not an array.</p>
37803780
</section>
37813781

@@ -11969,14 +11969,14 @@ <h2>Context Definitions</h2>
1196911969
<p>An <a>expanded term definition</a> MUST be a <a>map</a>
1197011970
composed of zero or more keys from
1197111971
<code>@id</code>,
11972+
<code class="changed">@import</code>,
1197211973
<code>@reverse</code>,
1197311974
<code>@type</code>,
1197411975
<code>@language</code>,
1197511976
<code>@container</code>,
1197611977
<code class="changed">@context</code>,
11977-
<code class="changed">@prefix</code>,
11978-
<code class="changed">@propagate</code>, or
11979-
<code class="changed">@source</code>.
11978+
<code class="changed">@prefix</code>, or
11979+
<code class="changed">@propagate</code>.
1198011980
An <a>expanded term definition</a> SHOULD NOT contain any other keys.</p>
1198111981

1198211982
<p>If the term being defined is not a <a>compact IRI</a> or
@@ -12046,7 +12046,7 @@ <h2>Context Definitions</h2>
1204612046
<p class="changed">If the <a>expanded term definition</a> contains the <code>@propagate</code>
1204712047
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
1204812048

12049-
<p class="changed">If the <a>expanded term definition</a> contains the <code>@source</code>
12049+
<p class="changed">If the <a>expanded term definition</a> contains the <code>@import</code>
1205012050
<a>keyword</a>, its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.</p>
1205112051

1205212052
<p><a>Terms</a> MUST NOT be used in a circular manner. That is,
@@ -12207,10 +12207,10 @@ <h2>Keywords</h2>
1220712207

1220812208
<p>See <a class="sectionRef" href="#sets-and-lists"></a> for further discussion on sets and lists.</p>
1220912209
</dd>
12210-
<dt class="changed">`@source`</dt><dd class="changed">
12211-
The `@source` keyword MUST NOT be aliased, and MAY be used in a <a>context definition</a>.
12210+
<dt class="changed">`@import`</dt><dd class="changed">
12211+
The `@import` keyword MUST NOT be aliased, and MAY be used in a <a>context definition</a>.
1221212212
Its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.
12213-
See <a class="sectionRef" href="#sourced-contexts"></a> for a further discussion.
12213+
See <a class="sectionRef" href="#imported-contexts"></a> for a further discussion.
1221412214
</dd>
1221512215
<dt><code>@type</code></dt><dd>
1221612216
The <code>@type</code> keyword MAY be aliased and MAY be used as a key in a <a>node object</a> or a <a>value object</a>.
@@ -13161,7 +13161,7 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
1316113161
<li>By default, all contexts are propagated when traversing <a>node objects</a>, other than
1316213162
type-scoped contexts. This can be controlled using the <code>@propagate</code>
1316313163
<a>entry</a> in a <a>local context</a>.</li>
13164-
<li>A context may contain a <code>@source</code> <a>entry</a> used to reference a remote context
13164+
<li>A context may contain an <code>@import</code> <a>entry</a> used to reference a remote context
1316513165
within a context, allowing <code>JSON-LD 1.1</code> features to be added to contexts originally
1316613166
authored for <code>JSON-LD 1.0</code>.</li>
1316713167
</ul>

0 commit comments

Comments
 (0)