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

Re: Datatypes

From: Dave Reynolds <der@hplb.hpl.hp.com>
Date: Wed, 22 Aug 2007 11:23:21 +0100
Message-ID: <46CC0E99.9010300@hplb.hpl.hp.com>
To: Bijan Parsia <bparsia@cs.man.ac.uk>
CC: Reto Bachmann-Gmür <reto@gmuer.ch>, semantic-web@w3.org

Bijan Parsia wrote:
> On 21 Aug 2007, at 16:42, Reto Bachmann-Gmür wrote:

(Hi Reto)

>> I'm writing an ontology with properties pointing to literals
>> representing the following:
>> - media types (eg: "application/xhtml+xml")
>> - media ranges (eg: "application/*")
>> - 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 question:
>> - Anyone knows a place where such datatypes are already defined?
> Not me.
>> - Datatypes are typically defined in an XML-schema, is there an ontology
>> to do so in RDF?
> RDF has pretty limited datatype support in general (both in the spec and 
> in the tools...as far as I know). 

I thought most RDF tools supported a good range of XSD types.

Jena also supports user defined types - both user defined XSD types and 
generic user defined types. A type URI which is not recognized will by 
default pass through safely (you can parse it, serialize it, get it's 
lexical form etc) so the minimum you need to do is to invent a URI for 
your datatype.

Reto, in your case it seems like all your types are variants on strings 
where you might want to impose syntax constraints, in which case 
defining regex restrictions on xsd:string seems like the easy approach.

> OWL has somewhat better support 
> including required support for xsd:string and xsd:integer, plus at least 
> defined support for other simple types:
>     <http://www.w3.org/TR/2003/WD-owl-semantics-20030203/syntax.html#2>
> Deriving URIs for user defined datatypes was left unspecified in 
> deference to the XML Schema working group. There's a discussion you 
> might find interesting:
>     <http://www.w3.org/TR/swbp-xsch-datatypes/>
> (Pellet implemented the daml solution.)

As does Jena.

Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England
Received on Wednesday, 22 August 2007 10:23:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:27 UTC