Skip to content

Commit 23318b7

Browse files
committed
Split example 46 into separate examples.
Fixes #241.
1 parent 70aa073 commit 23318b7

File tree

2 files changed

+88
-87
lines changed

2 files changed

+88
-87
lines changed

Gemfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/ruby-rdf/json-ld.git
3-
revision: 172e0c960c9771fa9f963eca55d28fb63bce56b0
3+
revision: adbd407fa4b5783c8a7f7b79653b6e38815ff854
44
branch: develop
55
specs:
66
json-ld (3.0.2)
@@ -14,8 +14,8 @@ GIT
1414
GEM
1515
remote: https://rubygems.org/
1616
specs:
17-
addressable (2.6.0)
18-
public_suffix (>= 2.0.2, < 4.0)
17+
addressable (2.7.0)
18+
public_suffix (>= 2.0.2, < 5.0)
1919
bcp47 (0.3.3)
2020
i18n
2121
builder (3.2.3)
@@ -28,7 +28,7 @@ GEM
2828
sxp (~> 1.0)
2929
equivalent-xml (0.6.0)
3030
nokogiri (>= 1.4.3)
31-
haml (5.1.1)
31+
haml (5.1.2)
3232
temple (>= 0.8.0)
3333
tilt
3434
hamster (3.0.0)
@@ -37,7 +37,7 @@ GEM
3737
i18n (1.6.0)
3838
concurrent-ruby (~> 1.0)
3939
json-canonicalization (0.1.0)
40-
json-ld-preloaded (3.0.3)
40+
json-ld-preloaded (3.0.4)
4141
json-ld (~> 3.0)
4242
multi_json (~> 1.12)
4343
rdf (~> 3.0)
@@ -77,11 +77,11 @@ GEM
7777
multi_json (1.13.1)
7878
net-http-persistent (3.1.0)
7979
connection_pool (~> 2.2)
80-
nokogiri (1.10.3)
80+
nokogiri (1.10.4)
8181
mini_portile2 (~> 2.4.0)
8282
nokogumbo (1.5.0)
8383
nokogiri
84-
public_suffix (3.1.1)
84+
public_suffix (4.0.1)
8585
rack (2.0.7)
8686
rake (12.3.3)
8787
rdf (3.0.12)
@@ -135,7 +135,7 @@ GEM
135135
rdf-turtle (3.0.6)
136136
ebnf (~> 1.1)
137137
rdf (~> 3.0)
138-
rdf-vocab (3.0.8)
138+
rdf-vocab (3.0.10)
139139
rdf (~> 3.0, >= 3.0.11)
140140
rdf-xsd (3.0.1)
141141
rdf (~> 3.0)
@@ -160,8 +160,8 @@ GEM
160160
rdf (~> 3.0)
161161
sxp (1.0.2)
162162
rdf (~> 3.0)
163-
temple (0.8.1)
164-
tilt (2.0.9)
163+
temple (0.8.2)
164+
tilt (2.0.10)
165165

166166
PLATFORMS
167167
ruby

index.html

Lines changed: 78 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -3440,90 +3440,91 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
34403440
types are listed, the order that <a>type-scoped contexts</a> are applied is based on
34413441
lexicographical ordering.</p>
34423442

3443-
<p>For example, consider the following semantically equivalent examples:</p>
3443+
<p>For example, consider the following semantically equivalent examples.
3444+
The first example, shows how properties and types can define their own
3445+
scoped contexts, which are included when expanding.</p>
34443446

3445-
<aside class="example" title="Expansion using embedded and scoped contexts">
3446-
<p>This example, shows how properties and types can define their own
3447-
scoped contexts, which are included when expanding.</p>
3448-
<pre data-transform="updateExample">
3449-
<!--
3450-
{
3451-
"@context": {
3452-
"@vocab": "http://example.com/vocab/"
3453-
"property": {
3454-
"@id": "http://example.com/vocab/property",
3455-
"@context": {
3456-
"term1": "http://example.com/vocab/term1"
3457-
#### ↑ Scoped context for "property" defines term1
3458-
},
3459-
},
3460-
"Type1": {
3461-
"@id": "http://example.com/vocab/Type1",
3462-
"@context": {
3463-
"term3": "http://example.com/vocab/term3"
3464-
#### ↑ Scoped context for "Type1" defines term3
3465-
},
3466-
},
3467-
"Type2": {
3468-
"@id": "http://example.com/vocab/Type2",
3469-
"@context": {
3470-
"term4": "http://example.com/vocab/term4"
3471-
#### ↑ Scoped context for "Type2" defines term4
3472-
},
3473-
},
3474-
},
3447+
<pre class="example" title="Expansion using embedded and scoped contexts" data-transform="updateExample">
3448+
<!--
3449+
{
3450+
"@context": {
3451+
"@version": 1.1,
3452+
"@vocab": "http://example.com/vocab/",
34753453
"property": {
3454+
"@id": "http://example.com/vocab/property",
34763455
"@context": {
3477-
"term2": "http://example.com/vocab/term2"
3478-
#### ↑ Embedded context defines term2
3479-
},
3480-
"@type": ["Type2", "Type1"],
3481-
"term1": "a",
3482-
"term2": "b",
3483-
"term3": "c",
3484-
"term4": "d",
3485-
}
3486-
}
3487-
-->
3488-
</pre>
3489-
3490-
<p>Contexts are processed depending on how they are defined. A <a>property-scoped context</a>
3491-
is processed first, followed by any <a>embedded context</a>,
3492-
followed lastly by the <a>type-scoped contexts</a>, in the appropriate order.
3493-
The previous example is logically equivalent to the following:</p>
3494-
<pre data-transform="updateExample">
3495-
<!--
3496-
{
3497-
"@context": {
3498-
"@vocab": "http://example.com/vocab/"
3499-
"property": "http://example.com/vocab/property",
3500-
"Type1": "http://example.com/vocab/Type1",
3501-
"Type2": "http://example.com/vocab/Type2",
3456+
"term1": "http://example.com/vocab/term1"
3457+
#### ↑ Scoped context for "property" defines term1####
3458+
}
35023459
},
3503-
"property": {
3504-
"@context": [{
3505-
"term1": "http://example.com/vocab/term1"
3506-
#### ↑ Scoped context for "property" defines term1
3507-
}, {
3508-
"term2": "http://example.com/vocab/term2"
3509-
#### ↑ Embedded context defines term2
3510-
}, {
3511-
"term3": "http://example.com/vocab/term3"
3512-
#### ↑ Scoped context for "Type1" defines term3
3513-
}, {
3460+
"Type1": {
3461+
"@id": "http://example.com/vocab/Type1",
3462+
"@context": {
3463+
"term3": "http://example.com/vocab/term3"
3464+
#### ↑ Scoped context for "Type1" defines term3####
3465+
}
3466+
},
3467+
"Type2": {
3468+
"@id": "http://example.com/vocab/Type2",
3469+
"@context": {
35143470
"term4": "http://example.com/vocab/term4"
3515-
#### ↑ Scoped context for "Type2" defines term4
3516-
}],
3517-
"@type": ["Type2", "Type1"],
3518-
"term1": "a",
3519-
"term2": "b",
3520-
"term3": "c",
3521-
"term4": "d",
3471+
#### ↑ Scoped context for "Type2" defines term4####
3472+
}
35223473
}
3474+
},
3475+
"property": {
3476+
"@context": {
3477+
"term2": "http://example.com/vocab/term2"
3478+
#### ↑ Embedded context defines term2####
3479+
},
3480+
"@type": ["Type2", "Type1"],
3481+
"term1": "a",
3482+
"term2": "b",
3483+
"term3": "c",
3484+
"term4": "d"
35233485
}
3524-
-->
3525-
</pre>
3526-
</aside>
3486+
}
3487+
-->
3488+
</pre>
3489+
3490+
<p>Contexts are processed depending on how they are defined.
3491+
A <a>property-scoped context</a> is processed first,
3492+
followed by any <a>embedded context</a>,
3493+
followed lastly by the <a>type-scoped contexts</a>,
3494+
in the appropriate order. The previous example is logically equivalent to the following:</p>
3495+
3496+
<pre class="example" title="Expansion using embedded and scoped contexts (embedding equivalent)" data-transform="updateExample">
3497+
<!--
3498+
{
3499+
"@context": {
3500+
"@vocab": "http://example.com/vocab/",
3501+
"property": "http://example.com/vocab/property",
3502+
"Type1": "http://example.com/vocab/Type1",
3503+
"Type2": "http://example.com/vocab/Type2"
3504+
},
3505+
"property": {
3506+
"@context": [{
3507+
"term1": "http://example.com/vocab/term1"
3508+
#### ↑ Previously scoped context for "property" defines term1####
3509+
}, {
3510+
"term2": "http://example.com/vocab/term2"
3511+
#### ↑ Embedded context defines term2####
3512+
}, {
3513+
"term3": "http://example.com/vocab/term3"
3514+
#### ↑ Previously scoped context for "Type1" defines term3####
3515+
}, {
3516+
"term4": "http://example.com/vocab/term4"
3517+
#### ↑ Previously scoped context for "Type2" defines term4####
3518+
}],
3519+
"@type": ["Type2", "Type1"],
3520+
"term1": "a",
3521+
"term2": "b",
3522+
"term3": "c",
3523+
"term4": "d"
3524+
}
3525+
}
3526+
-->
3527+
</pre>
35273528

35283529
<p class="note">If a <a>term</a> defines a <a>scoped context</a>,
35293530
and then that term is later re-defined,

0 commit comments

Comments
 (0)