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

Re: Language-tagged strings in Turtle

From: Eric Prud'hommeaux <eric@w3.org>
Date: Sat, 2 Nov 2013 11:43:22 -0400
To: Simon Reinhardt <simon.reinhardt@koeln.de>
Cc: public-rdf-comments@w3.org
Message-ID: <20131102154320.GB4798@w3.org>
Thank you for your careful review and apologies for the delay in responding.

* Simon Reinhardt <simon.reinhardt@koeln.de> [2013-02-20 22:49+0100]
> 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.

The editor's draft is now aligned with the recent Candidate
Recommendation RDF 1.1 Concepts and Abstract Syntax defintion for
literal <http://www.w3.org/TR/rdf11-concepts/#dfn-literal>:
[[
The literal has a lexical form of the first rule argument, <code>String</code>.
If the <code>'^^' iri</code> rule matched, the datatype is <code>iri</code> and the literal has no language tag.
If the <code>LANGTAG</code> rule matched, the datatype is <code>rdf:langString</code> and the language tag is <code>LANGTAG</code>.
If neither matched, the datatype is <code>xsd:string<code> and the literal has no language tag.
]]

If this meets satisfies your comment, please reply with the subject prefixed with "[RESOLVED]".


> 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
> 

-- 
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
Received on Saturday, 2 November 2013 15:43:53 UTC

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