- From: Harry Halpin <hhalpin@ibiblio.org>
- Date: Mon, 25 Jun 2007 23:32:16 -0400
- To: Danny Ayers <danny.ayers@gmail.com>
- Cc: public-grddl-wg <public-grddl-wg@w3.org>
Danny Ayers wrote: > > The SPARQL was a little problematic, the best version I could come up > with (with much assistance from AndyS) is below. Couple more minor > editorial points early on. I got rather blocked on this, hopefully the > rest of the doc won't take as long... > > *** Scheduling a Meeting > s/showin/shown in done > *** Referencing via Profile > > http://purl.org/NET/erdf/extract-rdf > => > http://purl.org/NET/erdf/extract-rdf.xsl > (appears in text & code) done, needs to double-check to make sure it still works. I assume it was previously done via media-types, if that still works I will remove ".xsl" since I think it's better practice to use media-types. > - > > "Then Jane's queries can be run on the merged calendars" > > Just before this line, something like: > "Because of the RDF model, this kind of data can be merged by simply > adding it to an RDF store, or a SPARQL query may be run across the > data sources after transformation to RDF." done, but we can't talk about SPARQL before introducing it. So changed to: 'One of the advantages of the RDF data model is that RDF data can be easily merged by adding it to a RDF store, so Jane can merge and query all the calendars together once they are transformed into RDF. Jane uses SPARQL <a href="#SPARQL">[SPARQL]</a> to query her data, which automatically merges the calendar data sources before running the query. SPARQL (The SPARQL Protocol and RDF Query Language) is a query language for RDF with a syntax similar to well-known data-base query languages.' > - > > PREFIX ical: <http://www.w3.org/2002/12/cal/icaltzd#> > > SELECT ?start1 ?stop1 ?loc1 ?summ1 > > 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 ( str(?start1) = str(?start2) ). > FILTER ( str(?stop1) = str(?stop2) ). > FILTER ( str(?loc1) = str(?loc2) ). > FILTER ( str(?start1) = str(?start3) ). > FILTER ( str(?stop1) = str(?stop3) ). > FILTER ( str(?loc1) = str(?loc3) ). > FILTER ( str(?start3) = str(?start2) ). > FILTER ( str(?stop3) = str(?stop2) ). > FILTER ( str(?loc3) = str(?loc2) ). > > FILTER ( ?event1 != ?event2 && ?event2 != ?event3 && ?event1 > != ?event3 ). > FILTER ( str(?summ1) < str(?summ2) && str(?summ2) < str(?summ3) ) . > } done. > explanatory text needed, maybe: > [[ > The SELECT line determines which variable will appear in the results, > here one of the start dates, one of the stop dates, a location and a > summary. The FROM lines identify the data sources to use in the query, > in this case the RDF/XML derived from Jane, David and Robin's original > documents. The WHERE section provides a pattern which can match three > events. The first block of FILTERs match up identical start and stop > dates as well as locations between the three events. These values, > which may be differently typed, are simplified to simple literals with > the str() operator. The final two FILTER lines are idiomatic > expressions which prevent multiple resultsreturning due to the > interchangeability of the variables. > ]] done. > results (using ARQ) are actually: > > start1 stop1 loc1 summ1 > | "2007-01-08"^^xs:date | "2007-01-11"^^xs:date | "Edinburgh, > UK"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> | "Web > Conference"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> | > > probably best to present as: > > start1 stop1 loc1 summ1 > "2007-01-08" "2007-01-11" "Edinburgh, UK" "Web Conference" > > seems to be the way it's already presented in Primer. -- -harry Harry Halpin, University of Edinburgh http://www.ibiblio.org/hhalpin 6B522426
Received on Tuesday, 26 June 2007 03:32:25 UTC