Skip to content

Commit 5b7e06c

Browse files
committed
Fix examples for direction and regenerate example files.
1 parent 3e45217 commit 5b7e06c

File tree

368 files changed

+1588
-869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+1588
-869
lines changed

Gemfile.lock

Lines changed: 5 additions & 5 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: adbd407fa4b5783c8a7f7b79653b6e38815ff854
3+
revision: c1e72171960b31bf417c7af9ecea6ebf75fd0316
44
branch: develop
55
specs:
66
json-ld (3.0.2)
@@ -34,10 +34,10 @@ GEM
3434
hamster (3.0.0)
3535
concurrent-ruby (~> 1.0)
3636
htmlentities (4.3.4)
37-
i18n (1.6.0)
37+
i18n (1.7.0)
3838
concurrent-ruby (~> 1.0)
3939
json-canonicalization (0.1.0)
40-
json-ld-preloaded (3.0.4)
40+
json-ld-preloaded (3.0.5)
4141
json-ld (~> 3.0)
4242
multi_json (~> 1.12)
4343
rdf (~> 3.0)
@@ -83,7 +83,7 @@ GEM
8383
nokogiri
8484
public_suffix (4.0.1)
8585
rack (2.0.7)
86-
rake (12.3.3)
86+
rake (13.0.0)
8787
rdf (3.0.12)
8888
hamster (~> 3.0)
8989
link_header (~> 0.0, >= 0.0.8)
@@ -135,7 +135,7 @@ GEM
135135
rdf-turtle (3.0.6)
136136
ebnf (~> 1.1)
137137
rdf (~> 3.0)
138-
rdf-vocab (3.0.10)
138+
rdf-vocab (3.0.11)
139139
rdf (~> 3.0, >= 3.0.11)
140140
rdf-xsd (3.0.1)
141141
rdf (~> 3.0)

common/extract-examples.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def table_to_dataset(table)
123123
case cell
124124
when '-', /^\s*$/
125125
else
126-
object = RDF::Literal(object.to_s, datatype: RDF::URI("https://www.w3.org/i18n##{object.language}_#{cell}"))
126+
object = RDF::Literal(object.to_s, datatype: RDF::URI("https://www.w3.org/ns/i18n##{object.language}_#{cell}"))
127127
# We might think something was an IRI, but determine that it's not
128128
end
129129
end

examples/A-protected-context-with-an-exception-statements.table

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2-
<html><body><table class="statements" data-result-for="A protected @context with an exception-expanded" data-to-rdf>
2+
<html><body><table class="statements" data-result-for="A protected @context with an exception-expanded" data-to-rdf data-no-lint>
33
<thead><tr>
44
<th>Subject</th>
55
<th>Property</th>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {
3+
"Type1": "http://example.com/vocab/Type1",
4+
"Type2": "http://example.com/vocab/Type2",
5+
"term1": "http://example.com/vocab#term1",
6+
"term2": "http://example.com/vocab#term2"
7+
}
8+
}
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"@context": {
3-
"@language": "ja"
3+
"@version": 1.1,
4+
"@vocab": "http://example.com/",
5+
"@language": "ar-EG",
6+
"@direction": "rtl",
7+
"details": {
8+
"@context": {
9+
"@direction": null
10+
}
11+
}
412
},
5-
"name": "花澄",
6-
"details": {
7-
"@context": {
8-
"@language": null
9-
},
10-
"occupation": "Ninja"
11-
}
13+
"title": "HTML و CSS: تصميم و إنشاء مواقع الويب",
14+
"details": {"genre": "Technical Publication"}
1215
}

examples/Combining-external-and-local-contexts-original.jsonld renamed to examples/Combining-external-and-local-contexts-compacted.jsonld

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"@context": [
33
"https://json-ld.org/contexts/person.jsonld",
44
{
5-
"pic": "http://xmlns.com/foaf/0.1/depiction"
5+
"pic": {
6+
"@id": "http://xmlns.com/foaf/0.1/depiction",
7+
"@type": "@id"
8+
}
69
}
710
],
811
"name": "Manu Sporny",

examples/Combining-external-and-local-contexts-expanded.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
33
"http://xmlns.com/foaf/0.1/homepage": [{"@id": "http://manu.sporny.org/"}],
44
"http://xmlns.com/foaf/0.1/depiction": [{
5-
"@value": "http://twitter.com/account/profile_image/manusporny"
5+
"@id": "http://twitter.com/account/profile_image/manusporny"
66
}]
77
}]

examples/Combining-external-and-local-contexts-statements.table

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<td>_:b0</td>
2424
<td>foaf:depiction</td>
2525
<td>http://twitter.com/account/profile_image/manusporny</td>
26-
<td>xsd:string</td>
26+
<td>IRI</td>
2727
</tr>
2828
</tbody>
2929
</table></body></html>

examples/Combining-external-and-local-contexts-turtle.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
[
33
foaf:name "Manu Sporny";
44
foaf:homepage <http://manu.sporny.org/>;
5-
foaf:depiction "http://twitter.com/account/profile_image/manusporny"
5+
foaf:depiction <http://twitter.com/account/profile_image/manusporny>
66
] .

examples/Combining-multiple-JSON-LD-script-elements-into-a-single-dataset-statements.table

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2-
<html><body><table class="statements" data-result-for="Combining multiple JSON-LD script elements into a single dataset-original" data-to-rdf>
2+
<html><body><table class="statements" data-result-for="Combining multiple JSON-LD script elements into a single dataset-compacted" data-to-rdf>
33
<thead><tr>
44
<th>Subject</th>
55
<th>Property</th>

examples/Compacting-using-a-default-vocabulary-compacted.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@context": {
3-
"@vocab": "http://xmlns.com/foaf/0.1/"
3+
"@vocab": "http://example.org/"
44
},
55
"@id": "http://example.org/places#BrewEats",
66
"@type": "Restaurant",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"@context": {
3-
"@vocab": "http://xmlns.com/foaf/0.1/"
3+
"@vocab": "http://example.org/"
44
}
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[{
22
"@id": "http://example.org/places#BrewEats",
3-
"@type": ["http://xmlns.com/foaf/0.1/Restaurant"],
4-
"http://xmlns.com/foaf/0.1/name": [{"@value": "Brew Eats"}]
3+
"@type": ["http://example.org/Restaurant"],
4+
"http://example.org/name": [{"@value": "Brew Eats"}]
55
}]

examples/Context-defined-in-an-HTML-document.html

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/Defining-an-context-within-a-term-definition-used-on-type-statements.table

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2-
<html><body><table class="statements" data-result-for="Defining an @context within a term definition used on @type-expanded" data-to-rdf>
2+
<html><body><table class="statements" data-result-for="Defining an @context within a term definition used on @type-expanded" data-to-rdf data-no-lint>
33
<thead><tr>
44
<th>Subject</th>
55
<th>Property</th>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"skos": "http://www.w3.org/2004/02/skos/core#",
5+
"labels": "@nest",
6+
"main_label": {"@id": "skos:prefLabel", "@nest": "labels"},
7+
"other_label": {"@id": "skos:altLabel", "@nest": "labels"},
8+
"homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"}
9+
}
10+
}

examples/Defining-property-nesting-statements.table

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2-
<html><body><table class="statements" data-result-for="Defining property nesting-expanded" data-to-rdf>
2+
<html><body><table class="statements" data-result-for="Defining property nesting - Expanded Input" data-to-rdf>
33
<thead><tr>
44
<th>Subject</th>
55
<th>Property</th>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"@context": {
3+
"Person": "http://xmlns.com/foaf/0.1/Person",
4+
"name": "http://xmlns.com/foaf/0.1/name",
5+
"knows": {"@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@id"}
6+
},
7+
"@included": [{
8+
"@id": "http://manu.sporny.org/about#manu",
9+
"@type": "Person",
10+
"name": "Manu Sporny",
11+
"knows": "https://greggkellogg.net/foaf#me"
12+
}, {
13+
"@id": "https://greggkellogg.net/foaf#me",
14+
"@type": "Person",
15+
"name": "Gregg Kellogg",
16+
"knows": "http://manu.sporny.org/about#manu"
17+
}]
18+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[{
2+
"@included": [{
3+
"@id": "http://manu.sporny.org/about#manu",
4+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
5+
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
6+
"http://xmlns.com/foaf/0.1/knows": [
7+
{"@id": "https://greggkellogg.net/foaf#me"}
8+
]
9+
}, {
10+
"@id": "https://greggkellogg.net/foaf#me",
11+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
12+
"http://xmlns.com/foaf/0.1/name": [{"@value": "Gregg Kellogg"}],
13+
"http://xmlns.com/foaf/0.1/knows": [
14+
{"@id": "http://manu.sporny.org/about#manu"}
15+
]
16+
}]
17+
}]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[{
2+
"@id": "http://manu.sporny.org/about#manu",
3+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
4+
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
5+
"http://xmlns.com/foaf/0.1/knows": [
6+
{"@id": "https://greggkellogg.net/foaf#me"}
7+
]
8+
}, {
9+
"@id": "https://greggkellogg.net/foaf#me",
10+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
11+
"http://xmlns.com/foaf/0.1/name": [{"@value": "Gregg Kellogg"}],
12+
"http://xmlns.com/foaf/0.1/knows": [
13+
{"@id": "http://manu.sporny.org/about#manu"}
14+
]
15+
}]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2+
<html><body><table class="statements" data-result-for="Describing disconnected nodes with @included-expanded" data-to-rdf>
3+
<thead><tr>
4+
<th>Subject</th>
5+
<th>Property</th>
6+
<th>Value</th>
7+
<th>Value Type</th>
8+
</tr></thead>
9+
<tbody>
10+
<tr>
11+
<td>http://manu.sporny.org/about#manu</td>
12+
<td>rdf:type</td>
13+
<td>foaf:Person</td>
14+
<td> </td>
15+
</tr>
16+
<tr>
17+
<td>http://manu.sporny.org/about#manu</td>
18+
<td>foaf:name</td>
19+
<td>Manu Sporny</td>
20+
<td> </td>
21+
</tr>
22+
<tr>
23+
<td>http://manu.sporny.org/about#manu</td>
24+
<td>foaf:knows</td>
25+
<td>https://greggkellogg.net/foaf#me</td>
26+
<td> </td>
27+
</tr>
28+
<tr>
29+
<td>https://greggkellogg.net/foaf#me</td>
30+
<td>rdf:type</td>
31+
<td>foaf:Person</td>
32+
<td> </td>
33+
</tr>
34+
<tr>
35+
<td>https://greggkellogg.net/foaf#me</td>
36+
<td>foaf:name</td>
37+
<td>Gregg Kellogg</td>
38+
<td> </td>
39+
</tr>
40+
<tr>
41+
<td>https://greggkellogg.net/foaf#me</td>
42+
<td>foaf:knows</td>
43+
<td>http://manu.sporny.org/about#manu</td>
44+
<td> </td>
45+
</tr>
46+
</tbody>
47+
</table></body></html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
2+
<http://manu.sporny.org/about#manu> a foaf:Person;
3+
foaf:name "Manu Sporny";
4+
foaf:knows <https://greggkellogg.net/foaf#me> .
5+
<https://greggkellogg.net/foaf#me> a foaf:Person;
6+
foaf:name "Gregg Kellogg";
7+
foaf:knows <http://manu.sporny.org/about#manu> .

examples/Example-demonstrating-the-context-sensitivity-for-type-statements-original.table renamed to examples/Example-demonstrating-the-context-sensitivity-for-type-statements-compacted.table

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2-
<html><body><table class="original selected" data-result-for="Example demonstrating the context-sensitivity for @type" data-to-rdf>
2+
<html><body><table class="compacted input selected" data-result-for="Example demonstrating the context-sensitivity for @type" data-to-rdf>
33
<thead><tr>
44
<th>Subject</th>
55
<th>Property</th>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"@language": "ar-EG",
5+
"@direction": "rtl",
6+
"ex": "http://example.com/vocab/",
7+
"publisher": { "@id": "ex:publisher", "@direction": null },
8+
"title": { "@id": "ex:title" },
9+
"title_en": { "@id": "ex:title", "@language": "en", "@direction": "ltr" }
10+
},
11+
"publisher": "مكتبة",
12+
"title": "HTML و CSS: تصميم و إنشاء مواقع الويب",
13+
"title_en": "HTML and CSS: Design and Build Websites"
14+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example.com/vocab/",
4+
"property": "http://example.com/vocab/property",
5+
"Type1": "http://example.com/vocab/Type1",
6+
"Type2": "http://example.com/vocab/Type2"
7+
},
8+
"property": {
9+
"@context": [{
10+
"term1": "http://example.com/vocab/term1"
11+
}, {
12+
"term2": "http://example.com/vocab/term2"
13+
}, {
14+
"term3": "http://example.com/vocab/term3"
15+
}, {
16+
"term4": "http://example.com/vocab/term4"
17+
}],
18+
"@type": ["Type2", "Type1"],
19+
"term1": "a",
20+
"term2": "b",
21+
"term3": "c",
22+
"term4": "d"
23+
}
24+
}

0 commit comments

Comments
 (0)