- From: Andy Seaborne <andy.seaborne@talis.com>
- Date: Sat, 19 Jun 2010 17:54:18 +0100
- To: Paul Gearon <gearon@ieee.org>
- CC: Norman Gray <norman@astro.gla.ac.uk>, Semantic Web <semantic-web@w3.org>
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 yet the nature of a list is that it is ordered (e.g. authors of a paper). 2/ { ?list rdf:rest*/rdf:first ?x } does not do what you might think it does. A tail of an rdf:List is itself a list so if you have (1 2 3) then there are lists (1 2 3), (2 3) and (3) in the graph. (This isn't as major as the lack of order.) As Paul says, update is not pretty. The complete solution would be to have lists as first class data object in the RDF model (as well as bags). Like RDF containers, modelling as triples, then exposing the triples means the gory details are passed onto the application and assumes everyone plays the game. Nathan - this is the nature of lists that SPARQL is dealing with. It could have imposed a list concept but that would only be for SPARQL, not RDF in general. Andy
Received on Saturday, 19 June 2010 16:54:37 UTC