W3C home > Mailing lists > Public > public-powderwg@w3.org > May 2007

Re: Musings on SPARQL Queries

From: Ivan Herman <ivan@w3.org>
Date: Tue, 29 May 2007 13:34:50 +0200
Message-ID: <465C0FDA.20200@w3.org>
To: Phil Archer <parcher@icra.org>
CC: Public POWDER <public-powderwg@w3.org>, Cedric Kiss <cedric@w3.org>

I was just playing/testing some SPARQL endpoints on my machine, and I
glanced through your document...

I ran the following query:

BASE <http://www.fosi.org/projects/powder/multiple_examples.rdf>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wdr: <http://www.w3.org/2007/05/powder#>
PREFIX ex: <http://example.org#>

SELECT ?maker ?rs ?setProp ?setValue ?ds ?dsProp ?dsValue ?issued
FROM <http://www.fosi.org/projects/powder/multiple_examples.rdf>
foaf:hasMaker ?maker .
wdr:hasScope ?rs.
wdr:hasDescription ?ds .

  OPTIONAL {?rs ?setProp ?setValue} .
  OPTIONAL {?ds ?dsProp ?dsValue} .
dcterms:issued ?issued} .
wdr:validUntil ?validUntil}

On Joseki and on Virtuoso Open Link, and both gave a correct result, see
the attached HTML file. As you could see, I had difficulties in getting
BASE working correctly (at least on Virtuoso), I will have to test it
more, but as far as your document goes, I think the conclusion should be
that query #8 should work.

I hope it helps


Phil Archer wrote:
> Hi all,
> As trailed earlier, I've been playing with SPARQL queries on the sort of
> data we're starting to build. In particular, I want to see how the
> resource grouping issue tumbles out and whether the queries become so
> ridiculous as to warrant a serious consideration of an alternative
> approach.
> To this end I've created a file full of DRs with different (and
> increasingly complex) Resource Sets and worked through some test
> queries. It's not finished yet but I've been at it all day and we're
> heading into a holiday weekend so it'll have to do for now. I believe,
> however, that with a small number of queries it's possible to extract
> all the necessary data from a DR, including all the attribution, scope
> and description data. Obviously it gets more difficult if you have
> complex data but essentially, it's looking quite simple - I think.
> C├ędric - can I ask you to upload this to the (public) web space please.
> Meanwhile, it's attached.
> Cheers
> Phil.


Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Tuesday, 29 May 2007 11:34:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:06:02 UTC