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

Re: RDF's curious literals

From: Garret Wilson <garret@globalmentor.com>
Date: Thu, 02 Aug 2007 08:45:43 -0700
Message-ID: <46B1FC27.3050809@globalmentor.com>
To: Richard Cyganiak <richard@cyganiak.de>
CC: Tim Berners-Lee <timbl@w3.org>, Sandro Hawke <sandro@w3.org>, Story Henry <henry.story@bblfish.net>, Semantic Web <semantic-web@w3.org>

Richard Cyganiak wrote:
>> 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.

But it produces something in the model. Forgive me if I said 
"rdf:datatype" when I meant, "the datatype URI of a typed literal, which 
is represented by rdf:datatype in the RDF/XML syntax".

> You quote RDF Concepts and Abstract Syntax. You will find that the 
> document does not mention rdf:datatype. The only specification that 
> mentions rdf:datatype is the RDF/XML spec.

But it mentions a typed literal's datatype URI, which is what I'm 
referring to. I'm sorry for putting the "rdf:" prefix on the 
term---you're correct that by doing so I incorrectly referred to 
something in the RDF/XML syntax.

> Now, of course, there *is* a distinction between typed literals and 
> other resources in the RDF abstract syntax.
> So, when you say, “death to rdf:datatype”, do you mean “death to 
> rdf:datatype” or do you mean “death to the distinction between typed 
> literals and URIs in the RDF abstract syntax”?

When I say "death to rdf:datatype", I mean "death to the datatype URI".

> You know, it's kind of hard to follow your arguments when you mix up 
> terms.

Um... well, I technically did mix up terms, but... well, now you know.

Death to the datatype URI.

>> So that means, in an API, if I want to see if an object is a US 
>> president or an integer, I would have to do the following:
> Do you? No. An API is just another surface syntax, and you can do 
> whatever pleases you in an RDF API. The abstract syntax doesn't in any 
> way limit or prescribe API design decisions. All it gives you is some 
> well-defined terminology that you *can* use in your API.
> You can do all kinds of convenient shortcuts and use whatever 
> terminology you like in your API, just as you can do all kinds of 
> convenient shortcuts in your RDF serialization of choice.
> Discussions of APIs are not very relevant to questions about the RDF 
> abstract syntax. No one is trying to stop you from unifying URIs and 
> literals *in your API*. Which I think would be a good idea. But we are 
> talking about the RDF abstract model here, don't we?

Because some people were finding discussions of the RDF abstract model a 
little too abstract, I was making it easier for them to understand by 
creating a fictitious Java API that very closely mirrors the RDF 
abstract model to show them how the resulting code uses inconsistent 
ways of doing the same thing. In this regard, discussion of an API very 
true to the RDF abstract syntax is very relevant---it is a pedagogical 
tool for those who have trouble imagining an abstract model in the, 
well, in the abstract.

You and I can talk about the abstract model, so feel free to ignore my 
pedagogical API.

> To use an XML metaphor, the RDF abstract syntax isn't like the DOM (an 
> API for XML), it's like the XML Infoset (an abstract data model for XML).


> “Inconsistent” means “containing a contradiction”. The example above 
> might demonstrate poor API design or a certain redundancy or 
> awkwardness in the RDF abstract syntax. But I don't see a 
> contradiction anywhere.
> Now you'll certainly say that this is all totally beside the point, 
> and that you didn't really mean to say “inconsistent” but something 
> else, and that we should consider your argument based on what you 
> *mean*, not on what you *say*.

"Inconsistent" has several senses, including "containing a 
contradiction," as you pointed out. I was and am using it in its other 
sense of "not regular or predictable" or "following no predictable 
pattern", as in, "does things different ways when there is no necessity 
for doing so." (See <http://www.answers.com/inconsistent> .)

> Go ahead.

So now that that's all cleared up, maybe we can go back to my original 
question, with clarification noted by asterisks:

Even if we prefer to write 123 and "123", why do we need *the datatype 
of a typed literal in the RDF abstract syntax* when we can simply use 
rdf:type set to xsd:Integer?


P.S. If you start saying that you don't understand rdf:type because I 
really mean the property resource identified by the URI 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, I will cry...
Received on Thursday, 2 August 2007 15:46:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:58 UTC