W3C home > Mailing lists > Public > public-rdf-wg@w3.org > May 2011

Re: Proposal for ISSUE-12, string literals

From: Richard Cyganiak <richard@cyganiak.de>
Date: Fri, 13 May 2011 16:00:21 +0100
Cc: Pat Hayes <phayes@ihmc.us>, RDF Working Group WG <public-rdf-wg@w3.org>
Message-Id: <62C9F1D4-DCA8-41E7-8A67-3C2639F7FCE3@cyganiak.de>
To: Alex Hall <alexhall@revelytix.com>
On 13 May 2011, at 15:33, Alex Hall wrote:
> It's for this reason that I'd prefer to keep rdf:PlainLiteral out of the core RDF specs and reserve it for exchanging language-tagged literals with systems that don't support that notion.  Having to deal with the extraneous '@' for literals without language tags seems like needless complexity for what should be a simple string manipulation.

Strong +1. Earlier I tried to work out the changes to the spec that would be required to make rdf:PlainLiteral the unified representation of strings, and it's a bloody mess and I really don't want to go there. I kept my notes on the wiki anyways:

> If we're going to say that everything has a datatype, I'd prefer to see "foo" get normalized to "foo"^^xsd:string.  But my reasons there are more aesthetic; it just seems wrong to single out that one particular primitive datatype and say that it should not be used.

> FWIW, my preferred approach would be to:
> 1. Say that every literal has *either* a datatype *or* a language tag.
> 2. Say that the datatype of the surface form "foo" is xsd:string.

This feels weird. Ok, "foo" is of type string, even though the type is implicit, I can understand that. But why is it no longer a string if I tag it as English? Shouldn't it still have an implicit type of string? So you have replaced one weird thing (multiple ways of representing a string) with another weird thing (a notion of string datatypes that doesn't make sense).

I think the sensible way would be:
1) every literal has *both* a datatype and a (possibly empty) language tag;
2) of the built-in datatypes, only xsd:string can have non-empty language tags;
3) plain literals and rdf:PlainLiterals don't exist;
4) "foo" in concrete syntaxes is syntactic sugar for "foo"^^xsd:string.
5) "foo"@en in concrete syntaxes is syntactic sugar for "foo"^^xsd:string@en.

This *might* work better than the rdf:PlainLiteral mess when translated into spec changes, but raises BC issues, and requires changes to syntax specs to add the syntactic sugar, so I prefer the proposal that says implementations MAY unify to plain literals, as it doesn't require changes to the abstract syntax.

> As long as the surface forms "foo" and "foo"^^xsd:string get normalized to the same thing (or systems have permission to do such normalization) then I'm happy.

Good to hear that.

Received on Friday, 13 May 2011 15:00:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:06 UTC