W3C home > Mailing lists > Public > public-rdf-comments@w3.org > August 2012

Re: Language-tagged strings

From: Richard Cyganiak <richard@cyganiak.de>
Date: Fri, 10 Aug 2012 18:18:01 +0100
Cc: public-rdf-comments@w3.org
Message-Id: <C4097184-E351-4266-B674-00F527260AA3@cyganiak.de>
To: Antoine Zimmermann <antoine.zimmermann@emse.fr>
Hi Antoine,

On 10 Aug 2012, at 17:08, Antoine Zimmermann wrote:
> The current Editor's draft of RDF Concept (as of 5th June 2012 [1]) defines a language-tagged string as literal [2]. By the definition of literal above, this means that a language-tagged string consists of:
> - a lexical form being a UNICODE string;
> - a datatype IRI.
> But it immediately contradicts this by saying that, in addition to lexical form and datatype IRI, it also has a non-empty language tag.

It doesn't contradict itself. You have just stopped reading halfway through the definition of "literal".

The form of the statement is: "An X consists of A, B, and, if and only if B=123, C." You only read: "An X consists of A, B", and then claimed that the rest is contradictory.

Now it could be rephrased to: "An X is either an X1 or an X2. An X1 consists of A and B; and B must not be equal to 123. An X2 consists of A, B, and C; and B must be equal to 123." This would be as precise as can be, but would be unnecessarily verbose and complicated, for a net loss in clarity. I don't see the point.

> Literal equality indicates that the definition of literals should rather be:
> A literal in an RDF graph consists of:
> - a lexical form,
> - a datatype IRI,
> - and an optional language tag.

No, because this definition omits the essential fact that a language tag is present if and only if the datatype IRI is rdf:langString.

> It would also be possible to simply include the language tag inside the lexical form like this:
> A literal in an RDF graph consists of:
> - a lexical form being a UNICODE string or a pair <UNICODE-string,BCP47-tag>,
> - a datatype IRI.
> where only the literals with type rdf:langString can have a language tag.

Incorrect, because rdf:langString *must* have a language tag. And lacks a definition of "language-tagged string".

Can you come up with better wording that is correct, complete, and concise?


> Then equality would be defined like this:
> Literal equality: Two literals are equal if and only if the two lexical forms (including possibly the language tag) and the two datatype IRIs compare equal, character by character.
> [1] RDF 1.1 Concepts and Abstract Syntax - W3C Editor's Draft 05 June 2012. http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html
> [2] 3.3 Literals, in [1]. http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#section-Graph-Literal
> -- 
> Antoine Zimmermann
> ISCOD / LSTI - Institut Henri Fayol
> École Nationale Supérieure des Mines de Saint-Étienne
> 158 cours Fauriel
> 42023 Saint-Étienne Cedex 2
> France
> Tél:+33(0)4 77 42 66 03
> Fax:+33(0)4 77 42 66 66
> http://zimmer.aprilfoolsreview.com/
Received on Friday, 10 August 2012 17:18:30 UTC

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