Re: Constraining Containers

> As I understand it; if a property has LinearStrings as 
its range, it
> can also be a container with LinearStrings.

technically, this won't work :

<rdf:Property ID="myprop">
    <rdfs:range 
rdf:resource="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222#Literal"/>
</rdf:Property>
<rdf:Description about="http://somwhere/something">
    <myprop>
        <rdf:Seq>
            <rdf:li> Item 1 </rdf:li>
            <rdf:li> Item 2 </rdf:li>
            <rdf:li> Item 3 </rdf:li>
        </rdf:Seq>
    </myprop>
</rdf:Description>

because range of myprop is rdf:Literal, and its value has 
type rdf:Seq.

> The type of container can't be specified in the schema 
specification.
> Some rules have to be stated outside RDF.

I agree with you, this is a weakness of RDFS.
I you do want to use RDFS anyway, I guess a very dirty 
workaround would be to write

<rdf:Description about="http://somwhere/something">
    <myprop>
        <rdf:Seq>
            <rdf:type 
resource="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222#Literal"/>
            <rdf:li> Item 1 </rdf:li>
            <rdf:li> Item 2 </rdf:li>
            <rdf:li> Item 3 </rdf:li>
        </rdf:Seq>
    </myprop>
</rdf:Description>

which is legal RDF, and turns out to be schema-valid,
but yikes, it IS ugly !

How would the community address that problem ?

  Pierre-Antoine

______________________________________________________
Boîte aux lettres - Caramail - http://www.caramail.com

Received on Friday, 21 April 2000 03:35:13 UTC