W3C home > Mailing lists > Public > www-rdf-interest@w3.org > June 2001

Re: RDF and simple data types

From: Saied Tazari <Saied.Tazari@zgdv.de>
Date: Thu, 21 Jun 2001 16:53:29 +0200
Message-ID: <3B320A69.E2726B3F@zgdv.de>
To: Kshemendra Chaturvedi <kshemendra.chaturvedi@ascom.com>
CC: www-rdf-interest@w3.org
Kshemendra Chaturvedi schrieb:
> 
> Hi,
> As per what I read, that RDF does not specify its own definition of basic
> data types like int, float, string etc.
> If I have to use those basic types in my RDF schema, do I have to define my
> own classes for these datatypes.
> Can I directly use the datatypes defined by XML Schema in my RDF schema.
> 
> Thanks
> Kshemendra

Hi,

you can use XML-schema datatypes in RDF if you include the namespace
in your description file, something like:

	 xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"

Then you can specify the range of a property in a schema like this
example ([1]):

	<rdfs:range
rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>

or specify values in a resource description like this example ([1]):

	<age><xsd:integer rdf:value="13"/></age>

Regards,

-- Saied Tazari

[1] Examples are taken from
http://www.daml.org/2001/03/daml+oil-ex.daml
Received on Thursday, 21 June 2001 10:54:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:49 GMT