W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2012

Re: draft response for PW1

From: Gregory Williams <greg@evilfunhouse.com>
Date: Thu, 28 Jun 2012 17:11:08 -0400
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <05BECD0F-993B-4BF6-8052-2CC82C28B481@evilfunhouse.com>
To: Carlos Buil Aranda <cbuil@fi.upm.es>

On Jun 28, 2012, at 4:43 PM, Carlos Buil Aranda wrote:

> Dear all,
> I attach the draft response for PW-1 http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2012Jun/0007.html
> draft: http://www.w3.org/2009/sparql/wiki/CommentResponse:PW1

Hi Carlos,

You say: "in the SPARQL 1.1 grammar there is no way for specifying the default dataset to query."

Am I simply misunderstanding what you're saying? For query, you specify it with FROM/FROM NAMED.

You continue:

In the same way there is no mechanism for specifying named graphs since the SERVICE keyword only provides mechanisms for directing specific pieces of SPARQL queries to an SPARQL endpoint. Thus, you correctly understood the specification.

I've brought this up before, but why can't the dataset for a SERVICE be specified using protocol parameters? i.e.:

SERVICE <http://example.com/sparql?default-graph-uri=XXX&named-graph-uri=YYY> {  }

Shouldn't this just work? (Assuming implementors have done the legwork to choose between using '?query=' and '&query=' when constructing the service invocation URI.)

The other possibility you point out (to send the default and named datasets defined by the main query) is not allowed: the SERVICE keyword translates the pattern inside into a new query to the remote dataset, using a SELECT * WHERE {...} without specifying the original query datasets. However, inside the SERVICE clause you can use a subquery in which you can specify to which graph direct the query:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name 
 SERVICE <http://example.org/sparql> {
   GRAPH <http://example.org/graph>
    { ?person foaf:name ?name ; foaf:mbox ?mbox }

That won't specify the dataset, though. It only specifies the active graph for matching the two triple patterns.  Is that what you are intending to point out?

Received on Thursday, 28 June 2012 21:11:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:06 UTC