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

Re: object of property shall be of an XML Schema datatype

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Mon, 27 Aug 2007 09:21:23 +0100
Message-Id: <7C3BE10C-61E6-4FF4-AD26-E947F5EFF423@cs.man.ac.uk>
Cc: "SW-forum" <semantic-web@w3.org>
To: "Hans Teijgeler" <hans.teijgeler@quicknet.nl>

On Aug 26, 2007, at 8:41 PM, Hans Teijgeler wrote:

>
> Hi,
>
> I am struggling with the question how to define a Restriction (or  
> else)
> telling that the object of a particular property shall be an  
> xsd:float, or
> any other XML Schema datatype.
>
> For example:
>
>     <rdfs:subClassOf>
>      <owl:Restriction>
>          <owl:onProperty rdf:resource="#value"/>
>          <owl:allValuesFrom
> rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
>      </owl:Restriction>
>    </rdfs:subClassOf>
>
> allValuesFrom expects a resource, and xsd:float isn't that.
> There must be a simple solution for this common problem.

I, personally, would never reason from what is or isn't a resource to  
the syntactic legality of a bit of OWL :)

This is fine. For OWLDLitude, you need that #value is a  
DatatypeProperty. Here's a test that is contradictory:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl ="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns="http://ex.org/#"
xml:base="http://ex.org/"
 >

<owl:DatatypeProperty rdf:about="#value"/>
<owl:Class rdf:about="#test">
<rdfs:subClassOf>
      <owl:Restriction>
          <owl:onProperty rdf:resource="#value"/>
          <owl:allValuesFrom
rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
      </owl:Restriction>
    </rdfs:subClassOf>
</owl:Class>

<test rdf:about="#a">
     <value>Foo</value>
</test>
</rdf:RDF>

The value of "value" is a plain literal which is disjoint from  
floats, thus you get a contradiction.

(As usual, I recommend such specific OWL questions be directed to  
public-owl-dev.)

Cheers,
Bijan.
Received on Monday, 27 August 2007 08:21:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:17 GMT