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

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 UTC