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

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 UTC