W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2004

Re: AW: WG: I need a RDFS Parser/Validator

From: Jeen Broekstra <jeen@aduna.biz>
Date: Wed, 01 Sep 2004 14:49:31 +0200
Message-ID: <4135C55B.8020205@aduna.biz>
To: Kianoush Eshaghi <Kianoush.Eshaghi@metadat.at>
Cc: 'Richard Newman' <r.newman@reading.ac.uk>, 'RDF interesting groupe' <www-rdf-interest@w3.org>

Kianoush Eshaghi wrote:

> Hi Richard!
> 
> 
>>Note that the correct behaviour is not to treat range and domain as
>>constraints, but for inference. E.g.
>>
>>:carType a           owl:ObjectProperty ;
>>          rdfs:domain :Car .
>>:x       :carType    :Saloon .
>>==========================================
>>:x       a           :Car .
>>
>>This is a common misunderstanding in validation. When "car" and
>>"person" aren't disjoint, and a property such as the above is applied
>>to a person, it is quite logical to infer that the subject is
>>both car
>>and person.
> 
> 
> You have alredy appointed that "carType" must be only applied to
> subjects, which instances of Car must be. A RDFS validator should be
> able to catch some violation such as the following misemployment:
> 
> <f:Person rdf:ID="me">
> 	<f:carType rdf:resource="saloon"/>
> </f:Person>

As Richard pointed out, rdfs:domain and rdfs:range are not usually 
used in this way. In your example, the result according to the 
standard interpretation would simply be that "me" is both of type 
Person and Car.

Nothing stops you from doing your kind of validation anyway of course, 
but it is not the default interpretation of the meaning of domain and 
range, which probably explains why so very few tools have support for 
it. I'd say your best best is to either look at ICS-FORTH's RVP (I 
don't have personal experience with it but I understand it does 
exactly this kind of validation), or use one of the RDF toolkits 
(Jena, Redland, Sesame, etc.) and build your own validator. Given that 
most toolkits have built-in support for RDF(S) inferencing, this 
shouldn't be too difficult.

By the way, the validation you require goes beyond parsing, since it 
requires knowledge of schema semantics. For example, if in your 
example we had a definition somewhere that said that Person was a 
subClassOf Car, then the domain restriction would not be 'violated'. 
Simple parsing is therefore not enough to do this kind of validation.

Best regards,

Jeen
-- 
Jeen Broekstra          Aduna BV
Knowledge Engineer      Julianaplein 14b, 3817 CS Amersfoort
http://aduna.biz        The Netherlands
tel. +31(0)33 46599877  fax. +31(0)33 46599877
Received on Wednesday, 1 September 2004 12:48:00 GMT

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