Who needs ‘AS’ in SPARQL?

Lee and I were having a little brainstorm to solve an issue we have with the SPARQL Calendar Demo. Basically, we are using AJAX to query graphs sucked in by sparql.org, but because not all data on the web is stored in RDF (darn), we must make use of very helpful services to convert existing data into RDF. Now the problem lies in the fact that we would like to make use of the GRAPH keyword to “kind of” keep track who’s the author of the triples, as in (excerpt):
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ical: <http://www.w3.org/2002/12/cal/icaltzd#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?title ?start ?end ?name ?location ?g 
WHERE {
  {
    {
      <http://torrez.us/who#elias> rdfs:seeAlso ?g .
       ?g rdf:type ical:Vcalendar .
       OPTIONAL {
        <http://torrez.us/who#elias> foaf:name ?name 
      } .
       OPTIONAL {
        <http://torrez.us/who#elias> rdfs:label ?name 
      } .

     ...snip...

     GRAPH ?g {
      _:ev ical:summary ?title; ical:dtstart ?start; ical:location ?location.
    }.
}
However, ?g is no longer what I named it inside my foaf file, instead it’s name is the url to the service with it as a parameter that converts it to RDF, for example:
http://torrez.us/elias/school.ics
versus
http://torrez.us/services/ics2rdf/http://torrez.us/elias/school.ics
Therefore wouldn’t it be nice if we could express the following in either the SPARQL Query Language or Protocol: SELECT ?title FROM <http://torrez.us/services/ics2rdf/http://torrez.us/elias/school.ics> AS <http://torrez.us/elias/school.ics> WHERE { ..snip... } I can imagine the discussion on the semantic-web mailing list over the meaning of AS and all the marriages it will destroy if not used properly.
  • co.mments
  • connotea
  • del.icio.us
  • digg
  • Ma.gnolia
  • Reddit
  • scuttle
  • Technorati
  • YahooMyWeb

About this entry