Skip to content

Commit c25e18c

Browse files
committed
Normalize language tags to lower case when creating i18n datatype or compound literal.
For #337.
1 parent eaf4b3e commit c25e18c

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
@@ -4935,8 +4935,13 @@ <h3>Algorithm</h3>
49354935
<var>item</var> is a <a>value object</a> which is serialized using special rules.
49364936
<ol>
49374937
<li id="alg-obj2rdf-direction-language">
4938-
Initialize <var>language</var> to the value of `@language` in <var>item</var>,
4939-
or the empty string (`""`) if there is no such entry.</li>
4938+
Initialize <var>language</var> to the value of `@language` in <var>item</var>
4939+
normalized to lower case,
4940+
or the empty string (`""`) if there is no such entry.
4941+
<div class="note">Generally, language tags are not normalized,
4942+
but when creating an `i18n-datatype` or `compound-literal`
4943+
values are normalized to lower case for improved interoperability.</div>
4944+
</li>
49404945
<li>If {{JsonLdOptions/rdfDirection}} is `i18n-datatype`,
49414946
set <var>datatype</var> to the result of appending <var>language</var>
49424947
and the value of `@direction` in <var>item</var> separated by an underscore (`"_"`)
@@ -4955,9 +4960,8 @@ <h3>Algorithm</h3>
49554960
as the object, and add it to <var>list triples</var>.</li>
49564961
<li>If the <var>item</var> has an entry for `@language`,
49574962
create a new triple using <var>literal</var> as the subject,
4958-
`rdf:language` as the predicate, and the value of `@language` in <var>item</var>
4959-
as the object, and add it to <var>list triples</var>.
4960-
<div class="changed note">Processors MAY normalize <a>language tags</a> to lower case.</div></li>
4963+
`rdf:language` as the predicate, and <var>language</var>
4964+
as the object, and add it to <var>list triples</var>.</li>
49614965
<li>Create a new triple using <var>literal</var> as the subject,
49624966
`rdf:direction` as the predicate, and the value of `@direction` in <var>item</var>
49634967
as the object, and add it to <var>list triples</var>.</li>
@@ -6863,6 +6867,8 @@ <h4>JsonLdErrorCode</h4>
68636867
<a href="#node-map-generation" class="sectionRef"></a>,
68646868
and <a href="#deserialize-json-ld-to-rdf-algorithm" class="sectionRef"></a>.
68656869
</li>
6870+
<li>When creating an `i18n` datatype or `rdf:CompoundLiteral`, <a>language tags</a> are
6871+
normalized to lower case to improve interoperability between implementations.</li>
68666872
</ul>
68676873
</section>
68686874
<!--section class="appendix informative" id="changes-from-cr">

0 commit comments

Comments
 (0)