Skip to content

Commit 7771d14

Browse files
committed
Normalize language tags to lower case when creating i18n datatype or compound literal.
For #337.
1 parent 2f57a54 commit 7771d14

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

Gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
GIT
22
remote: git://github.com/ruby-rdf/json-ld.git
3-
revision: d0bfdefb6cddac6a22683ff9733a94936c4e5dbe
3+
revision: 241ef57e096cefdff55ef6d39a917049eec04529
44
branch: develop
55
specs:
66
json-ld (3.1.0)
77
htmlentities (~> 4.3)
8-
json-canonicalization (~> 0.1)
8+
json-canonicalization (~> 0.2)
99
link_header (~> 0.0, >= 0.0.8)
1010
multi_json (~> 1.14)
1111
rack (~> 2.0)
@@ -33,9 +33,9 @@ GEM
3333
hamster (3.0.0)
3434
concurrent-ruby (~> 1.0)
3535
htmlentities (4.3.4)
36-
i18n (1.7.0)
36+
i18n (1.8.2)
3737
concurrent-ruby (~> 1.0)
38-
json-canonicalization (0.1.0)
38+
json-canonicalization (0.2.0)
3939
json-ld-preloaded (3.1.0)
4040
json-ld (~> 3.1)
4141
rdf (~> 3.1)
@@ -79,10 +79,10 @@ GEM
7979
mini_portile2 (~> 2.4.0)
8080
nokogumbo (2.0.2)
8181
nokogiri (~> 1.8, >= 1.8.4)
82-
public_suffix (4.0.1)
83-
rack (2.0.8)
82+
public_suffix (4.0.3)
83+
rack (2.1.2)
8484
rake (13.0.1)
85-
rdf (3.1.0)
85+
rdf (3.1.1)
8686
hamster (~> 3.0)
8787
link_header (~> 0.0, >= 0.0.8)
8888
rdf-aggregate-repo (3.1.0)
@@ -133,7 +133,7 @@ GEM
133133
rdf-turtle (3.1.0)
134134
ebnf (~> 1.2)
135135
rdf (~> 3.1)
136-
rdf-vocab (3.1.0)
136+
rdf-vocab (3.1.1)
137137
rdf (~> 3.1)
138138
rdf-xsd (3.1.0)
139139
rdf (~> 3.1)

index.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4913,8 +4913,13 @@ <h3>Algorithm</h3>
49134913
<var>item</var> is a <a>value object</a> which is serialized using special rules.
49144914
<ol>
49154915
<li id="alg-obj2rdf-direction-language">
4916-
Initialize <var>language</var> to the value of `@language` in <var>item</var>,
4917-
or the empty string (`""`) if there is no such entry.</li>
4916+
Initialize <var>language</var> to the value of `@language` in <var>item</var>
4917+
normalized to lower case,
4918+
or the empty string (`""`) if there is no such entry.
4919+
<div class="note">Generally, language tags are not normalized,
4920+
but when creating an `i18n-datatype` or `compound-literal`
4921+
values are normalized to lower case for improved interoperability.</div>
4922+
</li>
49184923
<li>If {{JsonLdOptions/rdfDirection}} is `i18n-datatype`,
49194924
set <var>datatype</var> to the result of appending <var>language</var>
49204925
and the value of `@direction` in <var>item</var> separated by an underscore (`"_"`)
@@ -4933,9 +4938,8 @@ <h3>Algorithm</h3>
49334938
as the object, and add it to <var>list triples</var>.</li>
49344939
<li>If the <var>item</var> has an entry for `@language`,
49354940
create a new triple using <var>literal</var> as the subject,
4936-
`rdf:language` as the predicate, and the value of `@language` in <var>item</var>
4937-
as the object, and add it to <var>list triples</var>.
4938-
<div class="changed note">Processors MAY normalize <a>language tags</a> to lower case.</div></li>
4941+
`rdf:language` as the predicate, and <var>language</var>
4942+
as the object, and add it to <var>list triples</var>.</li>
49394943
<li>Create a new triple using <var>literal</var> as the subject,
49404944
`rdf:direction` as the predicate, and the value of `@direction` in <var>item</var>
49414945
as the object, and add it to <var>list triples</var>.</li>
@@ -6836,6 +6840,8 @@ <h4>JsonLdErrorCode</h4>
68366840
<a href="#node-map-generation" class="sectionRef"></a>,
68376841
and <a href="#deserialize-json-ld-to-rdf-algorithm" class="sectionRef"></a>.
68386842
</li>
6843+
<li>When creating an `i18n` datatype or `rdf:CompoundLiteral`, <a>language tags</a> are
6844+
normalized to lower case to improve interoperability between implementations.</li>
68396845
</ul>
68406846
</section>
68416847
<!--section class="appendix informative" id="changes-from-cr">

0 commit comments

Comments
 (0)