Re: Constraining Containers

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 UTC