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

Re: description of WITH

From: Axel Polleres <axel.polleres@deri.org>
Date: Wed, 4 May 2011 02:14:42 +0100
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <9AC74D9B-3E07-4D94-9AA7-C2F2DA9E028A@deri.org>
To: Paul Gearon <pgearon@revelytix.com>
Note, I am mildly worried about that this rewritten text now means that 
WITH is *not* only a macro for GRAPH (which was what I had understood)

take:

 WITH <g>
 INSERT { ?s ?p ?o }
 USING <g1>
 USING NAMED <g>
 WHERE { ?s ?p ?o } 


my understanding was that this would be equivalent to:

1)
 INSERT { GRAPH <g> ?s ?p ?o }   <- here <g> points to <g> in GS
 USING <g1>                      
 USING NAMED <g>
 WHERE { GRAPH <g> ?s ?p ?o }    <- here <g> points to <g> in the dataset described by the UsingClauses 

i.e. WITH <g> would not interfer with USING at all, but just expand any non-GRAPH pattern to GRAPH <g>

in your understanding though, this would rather be equivalent to something like:

2) 
 INSERT { GRAPH <g> ?s ?p ?o } <- here <g> points to <g> in GS
 USING <g1>
 USING NAMED <g>
 WHERE { ?s ?p ?o } 

can you confirm this? 

The problem is that the treatment of option 2 might need some  
extra care/explanation in the formal semantics section, i.e. I need to re-check this, since 
that section was now was written in the understanding that WITH is pure syntactic sugar for 
adding GRAPH.

I personally think behavior 1) is more intuitive, but I can live with 2) if it is what the majority wants
and my understanding 1) was a misunderstanding.

I am too tired now to check in detail, but unless 1) is unacceptable 
for you, I could come up with a wording suggestion that covers this 
tomorrow morning. 

As far as I understand it, both 1) and 2) are in principle compatible with what is said in Section 4, since with is only mentioned 
before Table 1. It might be good though, if we could add *explicit* rewriting rules for 
WITH (reflecting either understanding 1) or 2) into Table 1, I will go with the majority among Andy and Paul here). 

I understand that if Andy, Paul and myself agree on those, we could still add them under the 
resolution to publish modulo ACTION-454... to be on the safe side, I would also ask Greg to approve.
Please anyone with different opinion, please shout!

I am sorry for that, but I didn't realize that I had a different understanding than Paul here.

Axel

On 3 May 2011, at 15:58, Paul Gearon wrote:

> The previous text for the use of WITH was previously:
> 
> That is, the GroupGraphPattern in the WHERE clause will be matched
> against the dataset described by explicit USING or USING NAMED
> clauses, if specified, and against the graph store otherwise. Any
> graph name specified in a WITH clause will - for evaluating the WHERE
> clause - refer to either the default graph of that explicitly defined
> dataset, or to the default graph of the graph store, respectively (in
> the absence of USING or USING NAMED clauses).
> 
> 
> This was unclear for me, since an explicitly defined dataset
> (described with the USING/USING NAMED keywords) will already have a
> default graph if there are USING keywords present. So I would like to
> propose calling out the various scenarios:
> 
> 
> That is, the GroupGraphPattern in the WHERE clause will be matched
> against the dataset described by explicit USING or USING NAMED
> clauses, if specified, and against the graph store otherwise. Any
> graph name specified in a WITH clause will - for evaluating the WHERE
> clause - refer to the default graph to be used in the absence of USING
> or USING NAMED clauses. In the presence of one or more graphs referred
> to in USING clauses, the default graph will be the merge of these
> graphs, meaning that the graph in a WITH clause will be ignored while
> evaluating the WHERE clause. If there is no USING clause, but there is
> one of more USING NAMED clauses, then the dataset will include a
> default graph specified by the WITH clause, if present, or an empty
> graph otherwise.
> 
> 
> 
> Paul Gearon
> 
Received on Wednesday, 4 May 2011 01:15:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:46 GMT