Re: RDF and simple data types

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 UTC