W3C home > Mailing lists > Public > www-rdf-interest@w3.org > April 2003

Re: typed containers in RDFS: suggestions about the "long range" problem

From: Francesco CannistrÓ <fracan@inwind.it>
Date: Mon, 14 Apr 2003 15:58:26 +0200
Message-ID: <019401c3028d$ec8836a0$36971d97@Matrix>
To: <www-rdf-interest@w3.org>
Hi Brian and All,

sorry but when I wrote that mail the high temperature of my body made me do
banal mistakes.
in a successive post I included the correct RDF.
In the final part of this mail there's the correct code and some
explainations

> If my corrections are correct, then you have restricted the range of
> rdfs:member to be instances of both Person and Apple, i.e. an RDFS
> processer will conclude that all persons in a  bag are also apples.

No! remember that original domain and range of rdfs:member is rdfs:Resource.
if I say:

<rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#member">
         <rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" />
         <rdfs:domain rdf:resource="#BagOfPersons" />
         <rdfs:range rdf:resource="#Person" />
</rdf:Description>

I restrict the range of rdfs:member to voc:Person, but only when this
property is asserted for a resource of type  voc:BagOfPersons ... not for
all bag and not for all resources. This complys with RDFS because everything
is of type rdfs:resource (the original range and domain of rdfs:member).

The same is true when I do an analoug thing with voc:BagOfApple and
voc:Apple.

Francesco

--------------------------
--------------------------

1) IN THE VOCABULARY SCHEMA

B) definition of Person typed bag class

<rdf:Description rdf:ID="BagOfPersons">
        <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"
/>
         <rdfs:subClassOf
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag" />
 </rdf:Description>
<rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#member">
         <rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" />
         <rdfs:domain rdf:resource="#BagOfPersons" />
         <rdfs:range rdf:resource="#Person" />
</rdf:Description>

B) definition of Apple typed bag class:

 <rdf:Description rdf:ID="BagOfApples">
        <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"

/>
         <rdfs:subClassOf
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag" />
  </rdf:Description>
 <rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#member">
         <rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" />
         <rdfs:domain rdf:resource="#BagOfApples" />
         <rdfs:range rdf:resource="#Apple" />
 </rdf:Description>

C) definition of 2 properties with bag structured value, one with long range
on Person and one with long range on Apple:

<rdf:Description rdf:ID="listPersons">
         <rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" />
         <rdfs:domain rdf:resource="#setOfPersonsDomain" />
         <rdfs:range rdf:resource="#BagOfPersons" />
</rdf:Description>

<rdf:Description rdf:ID="listApples">
         <rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" />
         <rdfs:domain rdf:resource="#setOfApplesDomain" />
         <rdfs:range rdf:resource="#BagOfApples" />
</rdf:Description>


2) IN A RDF MODEL INSTANCING THE SCHEMA:

<rdf:Description rdf:about="#aResource">
            <rdf:type
rdf:resource="http://theVocabularyNamespace#setOPersonsDomain"/>
            <voc:listPersons>
                   <rdf:Bag>
                        <rdf:_1>
                            <voc:Person
rdf:about="#1-st_Person">...</voc:Person>
                        </rdf:_1>
                        <rdf:_2>
                            <voc:Person
rdf:about="#2-nd_Person">...</voc:Person>
                        </rdf:_2>
                   </rdf:Bag>
            </voc:listPersons>
</rdf:Description>
<rdf:Desription rdf:about="#anotherResource">
            <rdf:type
rdf:resource="http://theVocabularyNamespace#setOfApplesDomain"/>
            <voc:listApples>
                   <rdf:Bag>
                        <rdf:_1>
                            <voc:Apple
rdf:about="#1-st_Apple">...</voc:Apple>
                        </rdf:_1>
                        <rdf:_2>
                            <voc:Apple
rdf:about="#2-nd_Apple">...</voc:Apple>
                        </rdf:_2>
                   </rdf:Bag>
            </voc:listApples>
 </rdf:Desription>

I assert the properties that have range on a typed bag, but I instance the
value as of type rdf:Bag. Provided with kowledge of the vocabulary schema
(from which processor sees that the range of voc:listPersons and
voc:listApples are voc:BagOfPerson and voc:BagOfApple) and provided that
every instance of voc:BagOfPerson or voc:BagOfApple is an instance of
rdf:Bag too, processor undestands that members of instaced bags must be,
respectivelly, of type voc:Person and voc:Apple.
Received on Monday, 14 April 2003 09:58:57 GMT

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