You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2014/09/30 11:04:33 UTC
[jira] [Created] (CLEREZZA-951) Language of RDF Literals is case
sensitive
Rupert Westenthaler created CLEREZZA-951:
--------------------------------------------
Summary: Language of RDF Literals is case sensitive
Key: CLEREZZA-951
URL: https://issues.apache.org/jira/browse/CLEREZZA-951
Project: Clerezza
Issue Type: Bug
Components: rdf.core
Reporter: Rupert Westenthaler
Based on the RDF specification (3.3 Literals [1]) BCP47 (Tags for Identifying Languages) have to be used as language values for RDF literals.
Section 2.1.1 of BCP47 [2] clearly states
{code}
At all times, language tags and their subtags, including private use
and extensions, are to be treated as case insensitive: there exist
conventions for the capitalization of some of the subtags, but these
MUST NOT be taken to carry meaning.
{code}
In Clerezza the following assertions fails
{code}
Literal l1 = new PlainLiteralImpl("test", new Language("EN"));
Literal l2 = new PlainLiteralImpl("test", new Language("en"));
Assert.assertEquals(l1, l2);
{code}
The same is true for the more likely case
{code}
Literal l1 = new PlainLiteralImpl("test", new Language("en-us"));
Literal l2 = new PlainLiteralImpl("test", new Language("en-US"));
Assert.assertEquals(l1, l2);
{code}
[1] http://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal
[2] http://tools.ietf.org/html/bcp47#section-2.1.1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)