W3C home > Mailing lists > Public > semantic-web@w3.org > June 2010

Re: What is it that's wrong with rdf:List

From: Pierre-Antoine Champin <swlists-040405@champin.net>
Date: Wed, 23 Jun 2010 12:59:01 +0200
Message-ID: <4C21E8F5.8050509@champin.net>
To: Andy Seaborne <andy.seaborne@talis.com>
CC: Semantic Web <semantic-web@w3.org>
On 20/06/2010 13:23, Andy Seaborne wrote:
> 
> 
> On 19/06/2010 10:05 PM, Pat Hayes wrote:
>>
>> On Jun 19, 2010, at 11:54 AM, Andy Seaborne wrote:
>>
>>>
>>>
>>> On 17/06/2010 11:35 PM, Paul Gearon wrote:
>>>> The main problem with an RDF list is that there is no mechanism in
>>>> SPARQL to query or update them. SPARQL only allows you to form queries
>>>> that explicitly describe connections, while an arbitrary list can have
>>>> any number of elements down its length. That means that you can refer
>>>> to, say, the 2nd, 3rd, or 4th elements in the list, but there is no
>>>> way to refer to ALL the elements in the list, since you don't know how
>>>> long the list is.
>>>>
>>>> SPARQL 1.1 will fix this problem with "property paths".
>>>
>>> with
>>>
>>> { <list> rdf:rest*/rdf:first ?x }
>>>
>>> this is only a partial solution:
>>>
>>> 1/ Order in a list is not preserved
>>
>> ? Preserved by what? Lists in RDF have an order (that is, the elements
>> of the list are put into an order by the list.) What is it that doesn't
>> 'preserve' this?
> 
> The SPARQL property path expression that Paul mentioned does not provide 
> any guarantee on order of results returned, nor do further operations of 
> the SPARQL algebra for graph patterns preserve order.  SPARQL looses the 
> ordering.  It can't properly return lists either, only members of a list.

By the way, is there a clean way in SPARQL to retrieve *all* items of an
rdf:Seq, which would preserve the order ?

The only way I can think of involves FILTER, regex on URIs, and would
put item #11 before item #2...

  pa
Received on Wednesday, 23 June 2010 10:59:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:36 GMT