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

Re: Datatypes

From: Garret Wilson <garret@globalmentor.com>
Date: Tue, 21 Aug 2007 10:31:50 -0700
Message-ID: <46CB2186.70801@globalmentor.com>
To: Reto Bachmann-Gmür <reto@gmuer.ch>
CC: semantic-web@w3.org

Reto Bachmann-Gmür wrote:
> - fully qualified java-class names (eg: "org.example.tools.MyTool")
> While I could use xsd:string I think it would be better to use custom
> datatypes to have literals like
> "org.example.tools.MyTool"^^http://example.org/datatypes#javaClass.

My opinion (see my earlier rants against RDF literals on this list): for 
Java classes shun literals and use URIs. For Java classes, use the 
"java" URI scheme. That's what I do. No, it's not official, but I would 
argue that it's more standardized than an any RDF Java class datatype 
out there. It makes sense. It was even listed on 
http://www.w3.org/Addressing/schemes.html at one time.

Back in 1999 Dan Brickley was apparently thinking along similar lines:


Although from reading the specs you might think that RDF allows you to 
create your own typed literal datatypes from scratch, in practice the 
only really useful typed literals are a subset of the XML Schema 
datatypes: strings, integers, booleans, and URIs---and you'll find that 
many people recommend using plain literals over xsd:string data-typed 
literals anyway, for various reasons. You'll even find some people who 
don't even to believe that from-scratch custom datatype literals can 
exist---or can only be created for a small group of things that they 
think are string-like.

Received on Tuesday, 21 August 2007 17:32:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:49:36 UTC