W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > February 2010

Re: Further comments on SPARQL 1.1 (property paths)

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Fri, 26 Feb 2010 16:08:53 +0000
Message-ID: <4B87F215.90209@talis.com>
To: Rob Vesse <rav08r@ecs.soton.ac.uk>
CC: public-rdf-dawg-comments@w3.org
Rob,

Thanks for the example.

I'll take it to working group for discussion.

By the way - the terminology "simple" and "complex" path in the first 
published working draft is scheduled to be removed as people did not 
think it added a helpful concept.

	Andy

On 26/02/2010 3:23 PM, Rob Vesse wrote:
> Hi Andy
>
> Consider the following trivial dataset:
>
> @prefix foaf:<http://xmlns.com/foaf/0.1/>  .
> @prefix :<http://example.org/>  .
>
> :a foaf:knows :b .
> :a foaf:knows :c .
> :b foaf:knows :d .
> :c foaf:knows :d .
>
> Given this dataset executing either of the following queries results in a
> result set containing two results where the results are duplicates.
>
> Explicit 2 Step Query
>
> PREFIX foaf:<http://xmlns.com/foaf/0.1/>
> SELECT ?x ?y WHERE { ?x foaf:knows ?z . ?z foaf:knows ?y }
>
> ?x = http://example.org/a , ?y = http://example.org/d
> ?x = http://example.org/a , ?y = http://example.org/d
>
> Equivalent Query using Property Paths
>
> PREFIX foaf:<http://xmlns.com/foaf/0.1/>
> SELECT ?x ?y WHERE {?x foaf:knows{2} ?y}
>
> ?x = http://example.org/a , ?y = http://example.org/d
> ?x = http://example.org/a , ?y = http://example.org/d
>
> The results are duplicates but seeing as there are two valid ways to bind
> this solution is this not a correct result set?  This is what I was trying
> to get at when I asked whether duplicates can occur when you transform a
> simple path.
>
> Rob Vesse
Received on Friday, 26 February 2010 16:09:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 26 February 2010 16:09:17 GMT