RE: Fixing SPARQL Query in GRDDL Primer

The following appears to work for me:

PREFIX ical: <http://www.w3.org/2002/12/cal/icaltzd#>
PREFIX xs: <http://www.w3.org/2001/XMLSchema#>
SELECT ?start1 ?stop1 ?loc1 ?summ1 ?summ2 ?summ3

FROM <http://www.w3.org/2001/sw/grddl-wg/doc29/david-erdf.rdf>
FROM <http://www.w3.org/2001/sw/grddl-wg/doc29/robin-hcal-grddl.rdf>
FROM <http://www.w3.org/2001/sw/grddl-wg/doc29/janeschedule.rdf>

WHERE
  { 
	?event1 a ical:Vevent;
              ical:summary ?summ1 ;
  	      ical:dtstart ?start1 ;
              ical:dtend ?stop1 ;
              ical:location ?loc1.
  	?event2 a ical:Vevent;
              ical:summary ?summ2 ;
  	      ical:dtstart ?start2;
              ical:dtend ?stop2;
              ical:location ?loc2.
  	?event3 a ical:Vevent;
              ical:summary ?summ3 ;
  	      ical:dtstart ?start3;
              ical:dtend ?stop3;
              ical:location ?loc3.

	FILTER (  ?event1 != ?event2) .
	FILTER (  ?event2 != ?event3) .
	FILTER (  ?event1 != ?event3) .
      FILTER ( xs:string(?start1) = xs:string(?start2) ).
      FILTER ( xs:string(?stop1) = xs:string(?stop2) ).
      FILTER ( xs:string(?start1) = xs:string(?start3) ).
      FILTER ( xs:string(?stop1) = xs:string(?stop3) ).
      FILTER ( xs:string(?loc1) = xs:string(?loc2) ).
      FILTER ( xs:string(?loc1) = xs:string(?loc3) ).

}

I interpret that as: "find three distinct events such that they each
have the same start, stop and location". I couldn't get this working
with xs:date - but I think it should so perhaps it's a problem with the
underlying sparql engine.

See it here (courtesy of xmlarmyknife.com):

http://tinyurl.com/ytrph5

Ian


 

> -----Original Message-----
> From: public-grddl-wg-request@w3.org 
> [mailto:public-grddl-wg-request@w3.org] On Behalf Of Harry Halpin
> Sent: 07 February 2007 04:09
> To: public-grddl-wg
> Subject: Fixing SPARQL Query in GRDDL Primer
> 
> 
> Everyone,
> 
>     I tried to fix the SPARQL query in the GRDDL Primer so it 
> works with Embedded RDF minus the data-types, but I still 
> can't get it to run. Any ideas? Someone here must know SPARQL 
> enough to figure this one out...
> 
> The query in question is this one:
> 
> http://www.w3.org/2001/sw/grddl-wg/doc29/schedulequery.rq
> 
> 
> Which matches all the data except david's Embedded RDF generated RDF.
> 
> Using xsd:dateTime to explicitly cast produces this query:
> 
> http://www.ibiblio.org/hhalpin/homepage/notes/schedulequery.rq
> 
> Which unfortunately seems to not produce any results. Both me 
> and dajobe are not sure why. This makes me thing the problem 
> is either David's eRDF GRDDL generated RDF:
> 
> http://www.w3.org/2001/sw/grddl-wg/doc29/david-erdf.rdf
> 
> Or the query itself :(
> 
> Any ideas?
> 
> 
> 
> 
> 
> -- 
> 		-harry
> 
> Harry Halpin,  University of Edinburgh
> http://www.ibiblio.org/hhalpin 6B522426
> 
> 
>
 
The very latest from Talis
read the latest news at www.talis.com/news 
listen to our podcasts www.talis.com/podcasts 
see us at these events www.talis.com/events 
join the discussion here www.talis.com/forums 
join our developer community www.talis.com/tdn 
and read our blogs www.talis.com/blogs

 
Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.
 
 
Talis Information Ltd is a member of the Talis Group of companies and is registered in England No 3638278 with its registered office at Knights Court, Solihull Parkway, Birmingham Business Park, B37 7YB.

Received on Wednesday, 7 February 2007 08:33:35 UTC