RE: Arrays in SKOS: proposal

Houghton,Andrew writes:

> Oops, I missed the collection at skos:members, so skos:ordered
> goes under skos:members?  If that's the case it seems to go
> against the grain of how the basic RDF rdf:Alt and rdf:Seq work.
> For example the collection semantics determine how they the
> element is interpreted.  So to extend the rdf:Alt and rdf:Seq
> analogy, I would expect to see skos:membersUnordered and
> skos:membersOrdered.

Careful. rdf:Alt, rdf:Seq, and rdf:Bag are part of the "container"
vocabulary. The "collection" vocabulary uses rdf:List and has a
different syntax in RDF/XML.

The two big advantage of the collection vocabulary are that it is easier
to reason about (because it involves a finite number of properties) and
that collections are "closed". (I go into a little more detail at
<http://lists.w3.org/Archives/Public/www-rdf-interest/2003Nov/0082.html>
, if anyone is interested.)

Another difference is that collections have no equivalent to the
Alt/Bag/Seq classes. Instead, it is up to vocabularies and applications
to determine what importance to place on the order of elements in a
list. (Note that the same is true of Bag and Seq--the formal RDF
semantics do not define what they mean.)



Below is a concrete example illustrating the difference between the
container and collection vocabularies.

Lets say we have the following terms in our vocabulary.

    thes:001 rdf:type skos:Concept.
    thes:001 skos:prefLabel "People".
    thes:001 skos:array _:1.

    thes:002 rdf:type skos:Concept.
    thes:002 skos:prefLabel "Children (0-12 years)".
    
    thes:003 rdf:type skos:Concept.
    thes:003 skos:prefLabel "Teenagers (13-19 years)".

    thes:004 rdf:type skos:Concept.
    thes:004 skos:prefLabel "Adults (over 20 years)".

(The "_:1" and "_:2" represent "blank nodes", which are essentially a
resource for which we are not specifying a URI.)

Now, if we were using the container vocabulary, we would write:

    _:1 rdf:type skos:Array.
    _:1 rdfs:label "people by age".
    _:1 skos:members _:2.
        
    _:2 rdf:type rdf:Seq.
    _:2 rdf:_1 thes:002.
    _:2 rdf:_2 thes:003.
    _:2 rdf:_3 thes:004.

In contrast, using the collection vocabulary, we have:

    _:1 rdf:type skos:Array.
    _:1 rdfs:label "people by age".
    _:1 skos:members _:2.
    
    _:2 rdf:first thes:002.
    _:2 rdf:rest _:3.
    
    _:3 rdf:first thes:003.
    _:3 rdf:rest _:4.
    
    _:4 rdf:first thes:004.
    _:4 rdf:rest rdf:nil.
-- 
David Menendez <zednenem@psualum.com> <http://www.eyrie.org/~zednenem/>

Received on Friday, 14 May 2004 00:31:22 UTC