Re: Datatypes

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:

http://lists.xml.org/archives/xml-dev/199903/msg00165.html

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.

Garret

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