W3C home > Mailing lists > Public > semantic-web@w3.org > August 2007

Re: RDF's curious literals

From: Story Henry <henry.story@bblfish.net>
Date: Thu, 2 Aug 2007 17:55:31 +0200
Message-Id: <1365B8D9-8D47-48DF-935B-B5DBCD368C75@bblfish.net>
Cc: Richard Cyganiak <richard@cyganiak.de>, Garret Wilson <garret@globalmentor.com>, Tim Berners-Lee <timbl@w3.org>, Sandro Hawke <sandro@w3.org>, Semantic Web <semantic-web@w3.org>
To: Lee Feigenbaum <lee@thefigtrees.net>

On 2 Aug 2007, at 17:37, Lee Feigenbaum wrote:
> Richard Cyganiak wrote:
>> On 2 Aug 2007, at 16:14, Garret Wilson wrote:
>>>> On 1 Aug 2007, at 18:32, Garret Wilson wrote:
>>>>>   3. Even if we prefer to write 123 and "123", why do we need
>>>>>      rdfs:datatype when we can simply use rdf:type set to  
>>>>> xsd:Integer?
>>>> Why do you keep railing against rdf:datatype? It is merely an  
>>>> artifact of the RDF/XML syntax. It does not exist in the RDF  
>>>> abstract syntax (which you call the “RDF model”).
>>> What? If that were true, there would be no such things as typed  
>>> literals in the model, because once you suck RDF/XML or N3 into  
>>> the model and then re-serialize it, you'd just have plain  
>>> literals again.
>> Garret, you say things like “why do we need rdf:datatype” and  
>> “death to rdf:datatype”. rdf:datatype is an XML attribute in the  
>> RDF/XML sytnax. Nothing else.
> Richard, Garret has been railing against rdf**s**:datatype, not  
> rdf:datatype. Of course, there is no such thing as rdfs:datatype,  
> so I've assumed all along he means rdfs:Datatype, analogous to his  
> other comments on rdfs:Literal. See http://www.w3.org/TR/rdf-schema/ 
> #ch_datatyp .
> rdfs:Datatype is, of course, quite distinct from the RDF/XML  
> datatype attribute.
> Lee

Thanks Lee, precision really is important and it helps move the  
conversation along. The rdfs:Datatype link you point to above links  
to the following Datatypes section:


A datatype consists of a lexical space, a value space and a lexical- 
to-value mapping.

The lexical space of a datatype is a set of Unicode [UNICODE] strings.

The lexical-to-value mapping of a datatype is a set of pairs whose  
first element belongs to the lexical space of the datatype, and the  
second element belongs to the value space of the datatype:

Each member of the lexical space is paired with (maps to) exactly one  
member of the value space.
Each member of the value space may be paired with any number  
(including zero) of members of the lexical space (lexical  
representations for that value).
A datatype is identified by one or more URI references.

RDF may be used with any datatype definition that conforms to this  
abstraction, even if not defined in terms of XML Schema.


The important point there is that there has to be a lexical to value  
mapping, and there has to be a one to one mapping. This can only work  
of course if all the information is contained in the String, ie,  
there is not more information to be got from anywhere else, or else  
there would be no way to create a decision procedure for it. So  
"George Bush"^^xxx:presidents would not work. For one, George Bush  
may never have been president.

Now if you think about say ints in Java you have exactly the same  
thing going on. You have some space allocated to the int which is  
equivalent to the lexical space, and some flag somewhere that tells  
the computer to interpret it as an int (and not as a char say). Think  
of the datatype URI as the same thing as that flag.

All that RDF is doing here is identifying the type using a URI,  
whereas other programming languages would do it with some local  

Received on Thursday, 2 August 2007 15:56:01 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:41:05 UTC