Are literal language tags compared in lowercase?

This is a comment for RDF 1.1 Concepts
http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/

>From https://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#section-Graph-Literal 

> A literal is a language-tagged string if the third element is present.
> Lexical representations of language tags may be converted to lower case. The
> value space of language tags is always in lower case.

Followed by:

> Literal term equality: Two literals are term-equal (the same RDF literal) 
> if and only if the two lexical forms, the two datatype IRIs, and the 
> two language tags (if any) compare equal, character by character. Thus, 
> two literals can have the same value without being the same RDF term. 
> For example:
>
>       "1"^^xs:integer
>      "01"^^xs:integer
>    
> denote the same value, but are not the same literal RDF terms and are not
> term-equal because their lexical form differs.


Could you help me clarify how language tags should be compared for determining
literal term equality? This came up in the Commons RDF discussion in
https://issues.apache.org/jira/browse/COMMONSRDF-51


There are two interpretations as far as I can see:

a) (Unicode) Character by character   
   "Hello"@en-us  !=  "Hello"@EN-US  !=  "Hello"@en-US

b) (Lower case Unicode) Character by character
  "Hello"@en  ==  "Hello"@EN  ==  "Hello"@en-US


The general interpretation seems to be that because the lexical representations
MAY be converted to lower case, plus the value space is lower case, language
tags should be compared in lower case as in b).   

However the text does say literally "character by character" as in a) 

So I would suggest - if you agree on b) - an amendmend like:

  Literal term equality: Two literals are term-equal (the same RDF literal) 
  if and only if the two lexical forms, the two datatype IRIs, and the 
  two language tags (if any) compare equal, character by character
  (but language tags must be compared in lower case).
  Thus, two literals ...



-- 
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718

Received on Wednesday, 11 January 2017 17:52:23 UTC