Skip to content

Commit f5741e4

Browse files
committed
Revert "Add section for @propagate and stub for @source."
This reverts commit f5b8a22.
1 parent f5b8a22 commit f5741e4

File tree

4 files changed

+32
-177
lines changed

4 files changed

+32
-177
lines changed

Gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
source "https://rubygems.org"
22

33
gem 'json-ld', github: 'ruby-rdf/json-ld', branch: 'develop'
4-
gem 'json-ld-preloaded'
54
gem 'nokogiri'
65
gem 'nokogumbo'
76
gem 'linkeddata'
87
gem 'colorize'
98
gem 'rake'
10-
gem 'byebug'

Gemfile.lock

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: git://github.com/ruby-rdf/json-ld.git
3-
revision: 813e1ff914cc1a1025db14de392fd738b4cbb674
3+
revision: 74a05a9f623c5a9e02cbe42f053f9d09181fee97
44
branch: develop
55
specs:
66
json-ld (3.0.2)
@@ -18,7 +18,6 @@ GEM
1818
bcp47 (0.3.3)
1919
i18n
2020
builder (3.2.3)
21-
byebug (11.0.1)
2221
colorize (0.8.1)
2322
concurrent-ruby (1.1.5)
2423
connection_pool (2.2.2)
@@ -27,7 +26,7 @@ GEM
2726
sxp (~> 1.0)
2827
equivalent-xml (0.6.0)
2928
nokogiri (>= 1.4.3)
30-
haml (5.1.1)
29+
haml (5.0.4)
3130
temple (>= 0.8.0)
3231
tilt
3332
hamster (3.0.0)
@@ -74,13 +73,13 @@ GEM
7473
sparql-client (~> 3.0)
7574
mini_portile2 (2.4.0)
7675
multi_json (1.13.1)
77-
net-http-persistent (3.0.1)
76+
net-http-persistent (3.0.0)
7877
connection_pool (~> 2.2)
7978
nokogiri (1.10.3)
8079
mini_portile2 (~> 2.4.0)
8180
nokogumbo (1.5.0)
8281
nokogiri
83-
public_suffix (3.1.1)
82+
public_suffix (3.0.3)
8483
rack (2.0.7)
8584
rake (12.3.2)
8685
rdf (3.0.12)
@@ -114,17 +113,17 @@ GEM
114113
rdf (>= 2.2, < 4.0)
115114
rdf-rdfa (>= 2.2, < 4.0)
116115
rdf-xsd (>= 2.2, < 4.0)
117-
rdf-reasoner (0.5.2)
116+
rdf-reasoner (0.5.1)
118117
rdf (~> 3.0)
119118
rdf-vocab (~> 3.0)
120119
rdf-xsd (~> 3.0)
121-
rdf-tabular (2.2.2)
120+
rdf-tabular (2.2.1)
122121
addressable (~> 2.3)
123122
bcp47 (~> 0.3, >= 0.3.3)
124123
json-ld (>= 2.1, < 4.0)
125-
rdf (~> 3.0)
126-
rdf-vocab (~> 3.0)
127-
rdf-xsd (~> 3.0)
124+
rdf (>= 2.2, < 4.0)
125+
rdf-vocab (>= 2.2, < 4.0)
126+
rdf-xsd (>= 2.2, < 4.0)
128127
rdf-trig (3.0.1)
129128
ebnf (~> 1.1)
130129
rdf (~> 3.0)
@@ -134,7 +133,7 @@ GEM
134133
rdf-turtle (3.0.6)
135134
ebnf (~> 1.1)
136135
rdf (~> 3.0)
137-
rdf-vocab (3.0.7)
136+
rdf-vocab (3.0.5)
138137
rdf (~> 3.0, >= 3.0.11)
139138
rdf-xsd (3.0.1)
140139
rdf (~> 3.0)
@@ -166,10 +165,8 @@ PLATFORMS
166165
ruby
167166

168167
DEPENDENCIES
169-
byebug
170168
colorize
171169
json-ld!
172-
json-ld-preloaded
173170
linkeddata
174171
nokogiri
175172
nokogumbo

common/extract-examples.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# - @data-options indicates the comma-separated option/value pairs to pass to the processor
1111
require 'getoptlong'
1212
require 'json'
13-
require 'json/ld/preloaded'
1413
require 'nokogiri'
1514
require 'linkeddata'
1615
require 'fileutils'

index.html

Lines changed: 22 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -591,19 +591,9 @@ <h2>Syntax Tokens and Keywords</h2>
591591
Used as the <code>@type</code> value of a <a>JSON literal</a>.
592592
This keyword is described in <a href="#json-literals" class="sectionRef"></a>.
593593
</dd>
594-
<dt class="changed"><code>:</code></dt><dd class="changed">
595-
The separator for JSON keys and values that use <a>compact IRIs</a>.</dd>
596-
<dt class="changed">`@propagate`</dt><dd class="changed">
597-
Used in a <a>context definition</a> to change the sccope of that context.
598-
By default, it is `true`,
599-
meaning that contexts propagate across <a>node objects</a>
600-
(other than for type-<a>scoped contexts</a>, which default to `false`).
601-
Setting this to `false` causes term definitions created within that context
602-
to be removed when entering a new <a>node object</a>.</dd>
603-
<dt class="changed">`@source`</dt><dd class="changed">
604-
Used in a <a>context definition</a> to load an external context
605-
within which the containing <a>context definition</a> is merged.
606-
This can be useful to add JSON-LD 1.1 features to JSON-LD 1.0 contexts.</dd>
594+
<dt><code>:</code></dt>
595+
<dd>The separator for JSON keys and values that use
596+
<a>compact IRIs</a>.</dd>
607597
</dl>
608598

609599
<p>All keys, <a>keywords</a>, and values in JSON-LD are case-sensitive.</p>
@@ -3419,9 +3409,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
34193409
different things depending on the context.
34203410
A <a>context</a> scoped on <code>@type</code> is only in effect for the <a>node object</a> on which
34213411
the type is used; the previous in-scope <a>contexts</a> are placed back into
3422-
effect when traversing into another <a>node object</a>.
3423-
As described further in <a href="#context-propagation" class="sectionRef"></a>,
3424-
this may be controlled using the `@propagate` keyword.</p>
3412+
effect when traversing into another <a>node object</a>.</p>
34253413

34263414
<p class="note">Any property-scoped or local contexts that were introduced in the <a>node object</a>
34273415
would still be in effect when traversing into another <a>node object</a>.</p>
@@ -3533,103 +3521,6 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
35333521
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
35343522
</section>
35353523

3536-
<section class="informative changed"><h2>Context Propagation</h2>
3537-
<p>Once introduced, <a>contexts</a> remain in effect until a subsequent
3538-
<a>context</a> removes it by setting `@context` to `null`,
3539-
or by redefining terms,
3540-
with the exception of type-<a>scoped contexts</a>,
3541-
which limits the affect of that context until the next <a>node object</a> is entered.
3542-
This behavior can be changed using the `@propagate` keyword.</p>
3543-
3544-
<p>The following example illustrates how terms defined in a context with `@propagate` set to `false`
3545-
are effectively removed when descending into new <a>node object</a>.</p>
3546-
3547-
<aside class="example ds-selector-tabs"
3548-
title="Marking a context to not propagate">
3549-
<div class="selectors">
3550-
<button class="selected" data-selects="compacted">Compacted (Input)</button>
3551-
<button data-selects="expanded">Expanded (Result)</button>
3552-
<button data-selects="statements">Statements</button>
3553-
<button data-selects="turtle">Turtle</button>
3554-
<a class="playground" target="_blank"></a>
3555-
</div>
3556-
<pre class="compacted input selected nohighlight" data-transform="updateExample">
3557-
<!--
3558-
{
3559-
"@context": {
3560-
"@version": 1.1,
3561-
"term": {
3562-
"@id": "http://example.org/original",
3563-
"@context": {
3564-
"@propagate": false,
3565-
#### ↑ Scoped context only lasts in one node-object####
3566-
"term": "http://example.org/non-propagated-term"
3567-
}
3568-
}
3569-
},
3570-
"term": {
3571-
#### ↑ This term is the original####
3572-
"term": {
3573-
#### ↑ This term is from the scoped context####
3574-
"term": "This term is from the first context"
3575-
#### ↑ This term is the original again####
3576-
}
3577-
}
3578-
}
3579-
-->
3580-
</pre>
3581-
<pre class="expanded result result nohighlight"
3582-
data-transform="updateExample"
3583-
data-result-for="Marking a context to not propagate-compacted">
3584-
<!--
3585-
[{
3586-
"http://example.org/original": [{
3587-
"http://example.org/non-propagated-term": [{
3588-
"http://example.org/original": [
3589-
{"@value": "This term is from the first context"}
3590-
]
3591-
}]
3592-
}]
3593-
}]
3594-
-->
3595-
</pre>
3596-
<table class="statements"
3597-
data-result-for="Marking a context to not propagate-expanded"
3598-
data-to-rdf
3599-
data-no-lint>
3600-
<thead><tr><th>Subject</th><th>Property</th><th>Value</th></tr></thead>
3601-
<tbody>
3602-
<tr><td>_:b2</td><td>http://example.org/original</td><td>This term is from the first context</td></tr>
3603-
<tr><td>_:b1</td><td>http://example.org/non-propagated-term</td><td>_:b2</td></tr>
3604-
<tr><td>_:b0</td><td>http://example.org/original</td><td>_:b1</td></tr>
3605-
</tbody>
3606-
</table>
3607-
<pre class="turtle"
3608-
data-content-type="text/turtle"
3609-
data-result-for="Marking a context to not propagate-expanded"
3610-
data-transform="updateExample"
3611-
data-to-rdf
3612-
data-no-lint>
3613-
<!--
3614-
@prefix ex: <http://example.org/> .
3615-
[
3616-
ex:original [
3617-
ex:non-propagated-term [
3618-
ex:original "This term is from the first context"
3619-
]
3620-
]
3621-
] .
3622-
-->
3623-
</pre>
3624-
</aside>
3625-
3626-
<p class="note">Contexts included within an array must all have the same value for `@propagate`
3627-
due to the way that rollback is defined in [[[JSON-LD11-API]]].</p>
3628-
</section>
3629-
3630-
<section class="informative changed"><h2>Sourced Contexts</h2>
3631-
</section>
3632-
36333524
<section class="informative changed"><h2>Protected Term Definitions</h2>
36343525
<p>JSON-LD is used in many specifications as the specified data format.
36353526
However, there is also a desire to allow some JSON-LD contents to be processed as plain JSON,
@@ -11823,12 +11714,10 @@ <h2>Context Definitions</h2>
1182311714
<code>@reverse</code>,
1182411715
<code>@type</code>,
1182511716
<code>@language</code>,
11826-
<code>@container</code>,
1182711717
<code class="changed">@context</code>,
11828-
<code class="changed">@prefix</code>,
11829-
<code class="changed">@propagate</code>, or
11830-
<code class="changed">@source</code>.
11831-
An <a>expanded term definition</a> SHOULD NOT contain any other keys.</p>
11718+
<code class="changed">@prefix</code>, or
11719+
<code>@container</code>. An
11720+
<a>expanded term definition</a> SHOULD NOT contain any other keys.</p>
1183211721

1183311722
<p>If the term being defined is not a <a>compact IRI</a> or
1183411723
<a>absolute IRI</a> and the <a>active context</a> does not have an
@@ -11894,20 +11783,14 @@ <h2>Context Definitions</h2>
1189411783
<p class="changed">If the <a>expanded term definition</a> contains the <code>@prefix</code>
1189511784
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
1189611785

11897-
<p class="changed">If the <a>expanded term definition</a> contains the <code>@propagate</code>
11898-
<a>keyword</a>, its value MUST be <code>true</code> or <code>false</code>.</p>
11899-
11900-
<p class="changed">If the <a>expanded term definition</a> contains the <code>@source</code>
11901-
<a>keyword</a>, its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.</p>
11902-
1190311786
<p><a>Terms</a> MUST NOT be used in a circular manner. That is,
1190411787
the definition of a term cannot depend on the definition of another term if that other
1190511788
term also depends on the first term.</p>
1190611789

1190711790
<p>See <a class="sectionRef" href="#the-context"></a> for further discussion on contexts.</p>
1190811791
</section>
1190911792

11910-
<section class="normative">
11793+
<section class="normative changed">
1191111794
<h2>Keywords</h2>
1191211795
<p>JSON-LD <a>keywords</a> are described in <a class="sectionRef" href="#syntax-tokens-and-keywords"></a>,
1191311796
this section describes where each <a>keyword</a> may appear within different JSON-LD structures.</p>
@@ -11924,17 +11807,17 @@ <h2>Keywords</h2>
1192411807
<code>@set</code>,
1192511808
<code>@language</code>,
1192611809
<code>@index</code>,
11927-
<code class="changed">@id</code>,
11928-
<code class="changed">@graph</code>,
11929-
<code class="changed">@type</code>, or be
11810+
<span><code>@id</code></span>,
11811+
<span><code>@graph</code></span>,
11812+
<span><code>@type</code></span>, or be
1193011813
<a>null</a>,
11931-
<span class="changed">or an <a>array</a> containing exactly any one of those keywords, or a
11932-
combination of <code>@set</code> and any of <code>@index</code>,
11933-
<code>@id</code>, <code>@graph</code>, <code>@type</code>,
11934-
<code>@language</code> in any order.
11935-
The value may also be an array
11936-
containing <code>@graph</code> along with either <code>@id</code> or
11937-
<code>@index</code> and also optionally including <code>@set</code></span>.
11814+
or an <a>array</a> containing exactly any one of those keywords, or a
11815+
combination of <code>@set</code> and any of <code>@index</code>,
11816+
<code>@id</code>, <code>@graph</code>, <code>@type</code>,
11817+
<code>@language</code> in any order.
11818+
The value may also be an array
11819+
containing <code>@graph</code> along with either <code>@id</code> or
11820+
<code>@index</code> and also optionally including <code>@set</code>.
1193811821
</dd>
1193911822
<dt><code>@context</code></dt><dd>
1194011823
The <code>@context</code> keyword MUST NOT be aliased, and MAY be used as a key in the following objects:
@@ -11954,12 +11837,6 @@ <h2>Keywords</h2>
1195411837
a <a>context definition</a>, or
1195511838
an <a>array</a> composed of any of these.
1195611839
</dd>
11957-
<dt>`@graph`</dt><dd>
11958-
The `@graph` keyword MAY be aliased and MAY be used as a key in a <a>node object</a> or a <a>graph object</a>.
11959-
The unaliased `@graph` MAY be used as the value of the <code>@container</code> key within an <a>expanded term definition</a>.
11960-
The value of the `@graph` key MUST be a <a>value object</a>, <a>node object</a>, or an array of either <a>value objects</a> or <a>node objects</a>.
11961-
See <a class="sectionRef" href="#named-graphs"></a>.
11962-
</dd>
1196311840
<dt><code>@id</code></dt><dd>
1196411841
The <code>@id</code> keyword MAY be aliased and MAY be used as a key in a <a>node object</a> or a <a>graph object</a>.
1196511842
The unaliased <code>@id</code> MAY be used as a key in an <a>expanded term definition</a>,
@@ -12002,7 +11879,7 @@ <h2>Keywords</h2>
1200211879

1200311880
<p>See <a class="sectionRef" href="#sets-and-lists"></a> for further discussion on sets and lists.</p>
1200411881
</dd>
12005-
<dt class="changed"><code>@nest</code></dt><dd class="changed">
11882+
<dt><code>@nest</code></dt><dd>
1200611883
The <code>@nest</code> keyword MAY be aliased and MAY be used as a key in a <a>node object</a>.
1200711884
The unaliased <code>@nest</code> MAY be used as the value of a <a>simple term definition</a>,
1200811885
or as a key in an <a>expanded term definition</a>.
@@ -12011,7 +11888,7 @@ <h2>Keywords</h2>
1201111888
Its value MUST be a <a>string</a>.
1201211889
See <a class="sectionRef" href="#property-nesting"></a> for a further discussion.
1201311890
</dd>
12014-
<dt class="changed"><code>@none</code></dt><dd class="changed">
11891+
<dt><code>@none</code></dt><dd>
1201511892
The <code>@none</code> keyword MAY be aliased and MAY be used as a key in an
1201611893
<a>index map</a>, <a>id map</a>, <a>language map</a>, <a>type map</a>.
1201711894
See <a class="sectionRef" href="#data-indexing"></a>,
@@ -12021,18 +11898,13 @@ <h2>Keywords</h2>
1202111898
<a class="sectionRef" href="#named-graph-indexing"></a>, or
1202211899
<a class="sectionRef" href="#named-graph-data-indexing"></a>
1202311900
for a further discussion.</dd>
12024-
<dt class="changed"><code>@prefix</code></dt><dd class="changed">
11901+
<dt><code>@prefix</code></dt><dd>
1202511902
The <code>@prefix</code> keyword MUST NOT be aliased, and MAY be used as a key in an <a>expanded term definition</a>.
1202611903
Its value MUST be <code>true</code> or <code>false</code>.
1202711904
See <a class="sectionRef" href="#compact-iris"></a>
1202811905
and <a class="sectionRef" href="#context-definitions"></a>
1202911906
for a further discussion.
1203011907
</dd>
12031-
<dt class="changed">`@propagate`</dt><dd class="changed">
12032-
The `@propagate` keyword MUST NOT be aliased, and MAY be used in a <a>context definition</a>.
12033-
Its value MUST be <code>true</code> or <code>false</code>.
12034-
See <a class="sectionRef" href="#context-propagation"></a> for a further discussion.
12035-
</dd>
1203611908
<dt><code>@reverse</code></dt><dd>
1203711909
The <code>@reverse</code> keyword MAY be aliased and MAY be used as a key in a <a>node object</a>.
1203811910
The unaliased <code>@reverse</code> MAY be used as a key in an <a>expanded term definition</a>.
@@ -12058,11 +11930,6 @@ <h2>Keywords</h2>
1205811930

1205911931
<p>See <a class="sectionRef" href="#sets-and-lists"></a> for further discussion on sets and lists.</p>
1206011932
</dd>
12061-
<dt class="changed">`@source`</dt><dd class="changed">
12062-
The `@source` keyword MUST NOT be aliased, and MAY be used in a <a>context definition</a>.
12063-
Its value MUST be an <a>absolute IRI</a> or <a>relative IRI</a>.
12064-
See <a class="sectionRef" href="#sourced-contexts"></a> for a further discussion.
12065-
</dd>
1206611933
<dt><code>@type</code></dt><dd>
1206711934
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>.
1206811935
The unaliased <code>@type</code> MAY be used as a key in an <a>expanded term definition</a>,
@@ -12078,7 +11945,7 @@ <h2>Keywords</h2>
1207811945
Its value key MUST be either a <a>string</a>, a <a>number</a>, <code>true</code>, <code>false</code> or <a>null</a>.
1207911946
This keyword is described further in <a class="sectionRef" href="#value-objects"></a>.
1208011947
</dd>
12081-
<dt class="changed"><code>@version</code></dt><dd class="changed">
11948+
<dt><code>@version</code></dt><dd>
1208211949
The <code>@version</code> keyword MUST NOT be aliased and MAY be used as a key in a <a>context definition</a>.
1208311950
Its value MUST be a <a>number</a> with the value <code>1.1</code>.
1208411951
This keyword is described further in <a class="sectionRef" href="#context-definitions"></a>.
@@ -13009,12 +12876,6 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
1300912876
to limit the ability of other contexts to override them.</li>
1301012877
<li>A <a>context</a> defined in an <a>expanded term definition</a> may also be used for values
1301112878
of <code>@type</code>, which defines a <a>context</a> to use for <a>node objects</a> including the associated type.</li>
13012-
<li>By default, all contexts are propagated when traversing <a>node objects</a>, other than
13013-
type-scoped contexts. This can be controlled using the <code>@propagate</code>
13014-
<a>entry</a> in a <a>local context</a>.</li>
13015-
<li>A context may contain a <code>@source</code> <a>entry</a> used to reference a remote context
13016-
within a context, allowing <code>JSON-LD 1.1</code> features to be added to contexts originally
13017-
authored for <code>JSON-LD 1.0</code>.</li>
1301812879
</ul>
1301912880
</section>
1302012881

0 commit comments

Comments
 (0)