W3C home > Mailing lists > Public > public-rdf-comments@w3.org > February 2013

Language-tagged strings in Turtle

From: Simon Reinhardt <simon.reinhardt@koeln.de>
Date: Wed, 20 Feb 2013 22:49:32 +0100
Message-ID: <512544EC.6020003@koeln.de>
To: public-rdf-comments@w3.org
Hi,

The parsing section of the Turtle spec [1] states the following:

> Literals are composed of a lexical form and an optional language tag [BCP47] or datatype IRI.

However that's not what the RDF Concepts spec states [2]:

> A literal is a language-tagged string if and only if its datatype IRI is http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, and only in this case the third element is present: a non-empty language tag as defined by [BCP47].

So a literal *always* has a datatype IRI and if it is http://www.w3.org/1999/02/22-rdf-syntax-ns#langString it also has to have a language tag.
I think the term constructor for RDFLiteral in the Turtle spec needs to explicitly state that if the LANGTAG production rule matched then this is a language-tagged string with the specific datatype IRI http://www.w3.org/1999/02/22-rdf-syntax-ns#langString.

The next sentence in the term constructor for RDFLiteral has a small typo, it needs to start upper-case:

> if neither a language tag nor a datatype IRI is provided, the literal has a datatype of xsd:string.

Otherwise it can stay like that since RDF Concepts explicitly allows this:

> Concrete syntaxes may support simple literals, consisting of only a lexical form without any datatype IRI or language tag. Simple literals only exist in concrete syntaxes, and are treated as syntactic sugar for abstract syntax literals with the datatype IRI http://www.w3.org/2001/XMLSchema#string.

Regards,
   Simon


[1] http://www.w3.org/TR/2013/CR-turtle-20130219/#sec-parsing
[2] http://www.w3.org/TR/2013/WD-rdf11-concepts-20130115/#dfn-language-tagged-string
Received on Wednesday, 20 February 2013 21:50:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:55 UTC