W3C home > Mailing lists > Public > public-lod@w3.org > February 2010

Re: Why are RDF containers (rdf:Seq etc.) so little appreciated?

From: Pat Hayes <phayes@ihmc.us>
Date: Sun, 14 Feb 2010 10:58:24 -0600
Cc: Linked Data community <public-lod@w3.org>
Message-Id: <F2B57434-7C34-418E-B25B-5DE2860CA8FE@ihmc.us>
To: Axel Rauschmayer <axel@rauschma.de>

On Feb 14, 2010, at 4:34 AM, Axel Rauschmayer wrote:

>> Im not sure what you  mean by 'stable identity',
>
> It's a slightly (possibly unorthodox) viewpoint I take during RDF  
> editing: With a container, you can say "I will edit the sequence at  
> URI X" and be sure that X stays the same, no matter how you change  
> the elements. With a collection, the "anchor" changes whenever one  
> goes from 0 elements to 1 or more elements (or vice versa). Giving a  
> collection a stable identity seems to have been one of the  
> motivations behind skos:OrderedCollection.

Ah, I see. Ironically, this is the source of the problem.

>
>> but the chief problem with containers is the fact that there is no  
>> way to 'close' them. If I say that FOO is a container and A, B and  
>> C are in it, there is no way to say that this is *all* that is in  
>> it. This makes them useless for encoding structures, eg OWL syntax.  
>> Collections' overcome this difficulty. So the collection notion is  
>> widely used to layer higher-level notations onto RDF, which is  
>> probably why toolkits have special provision for them.
>
> I see the point, but it seems like one could achieve the same effect  
> by adding an additional "nil" element (at the end) to a container.

No, you can't. The problem is that this would (if it were effective)  
make the logic nonmonotonic. Put another way, objects described in RDF  
cannot have 'state' in the computational sense. They cannot 'change'  
by adding new assertions. Whatever was true before you say the new  
stuff has to stay true afterwards. So you can't take a container and  
*change* the elements it has, eg go from 0 to 1 elements, by adding  
assertions. The great advantage of lists is, when you "add an element  
to" a list, you are in fact creating a new list: the old list is still  
around and is still what it was before the "addition". This is why  
lists (collections) work in RDF, more or less, while containers don't.  
That is, RDF containers, so called, are not really containers in the  
usual sense one would think of when talking about data structures.  
This is also why lists don't have what you call a stable identity:  
what you want is the longer list after the addition to be the *same  
list* with a changed state, but that isn't possible in RDF because  
there is no state to change.

Pat


>
>> This does not stop you using the containers, of course. They are  
>> simple enough that you hardly need syntactic sugar, right?
>
>
> True.
>
> -- 
> Axel.Rauschmayer@ifi.lmu.de
> http://www.pst.ifi.lmu.de/~rauschma/
>
>
>
>

------------------------------------------------------------
IHMC                                     (850)434 8903 or (650)494 3973
40 South Alcaniz St.           (850)202 4416   office
Pensacola                            (850)202 4440   fax
FL 32502                              (850)291 0667   mobile
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes
Received on Sunday, 14 February 2010 16:59:28 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:25 UTC