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

Re: Constraining Containers

From: (wrong string) çois <francoisleygues@yahoo.com>
Date: Sat, 22 Apr 2000 09:37:14 -0700 (PDT)
Message-ID: <20000422163714.17365.qmail@web705.mail.yahoo.com>
To: www-rdf-interest@w3.org

So, there are several possible ways to express that. 

May I suggest one ? It is perhaps less elegant than
what you say. 

Suppose I want to define a Sequence of Literals. 

There is a "metaclass" 

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

whose instances, which are classes,  support  a "class
property"
(similar to smalltalk class variables) , 
  

<rdf:Property rdf:ID="ContainerConstraint"> 
<rdfs:domain rdf:resource="#ConstrainedContainer"> 
<rdfs:range
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class">

</rdf:Property> 

I can then define the LiteralSeq class : 

<rdf:Description  rdf:ID="LiteralSeq"> 
<rdfs:subClassOf
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Seq"/>

<rdf:type rdf:resource="#ConstrainedContainer"> 
<ContainerConstraint
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>

</rdfs:Description> 

and use it : 

<rdfs:Class rdf:resource="LiteralOrSeq"/> 

I dont  know if I can add a superclass to an RDF core
class, but i trust you :

<rdf:Description
rdf:about=""http://www.w3.org/2000/01/rdf-schema#Literal">

<rdfs:subClassOf rdf:resource="#LiteralOrSeq"/> 
</rdf:Description> 

<rdf:Description rdf:about="#LiteralSeq"> 
<rdfs:subClassOf rdf:resource="#LiteralOrSeq"/> 
</rdf:Description> 
  
  

<rdf:Property ID="myprop"> 
  <rdfs:range rdf:resource="#LiteralOrSeq"/> 
</rdf:Property> 
  

<rdf:Description about="http://somwhere/something"> 
  <myprop> 
    <LiteralSeq> 
      <rdf:li>literal1</rdf:li> 
      <rdf:li>literal2</rdf:li> 
      <rdf:li>literal3</rdf:li> 
    </LiteralSeq> 
  </myprop> 
</rdf:Description> 

Is this reasonable  ? 

Note that  the ICS-FORTH validating RDF parser dont
want to validate li elements for containers which are
not Bag Seq or Alt.... 

In any case, I think we need something like either an
addition to RDFS,
or at least a general purpose guideline to 
author RDF schemas. What do you think ? 


Bye. 
  
  

__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com
Received on Saturday, 22 April 2000 12:37:17 GMT

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