- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Wed, 04 May 2011 09:46:47 +0100
- To: public-rdf-dawg@w3.org
On 04/05/11 02:14, Axel Polleres wrote: > 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 prefer (2). Reading naively WITH <g> ... USING<g1> USING NAMED<g2> USING NAMED<g3> WHERE { ?s ?p ?o } would result in WHERE going to <g1> just from reading that operation. "USING<g1>" is closer than the "WITH <g>" so think bracketting and I'd expect that { ?s ?p ?o } matched on <g1> Make that two WITH <g> ... USING<g1a> USING<g1b> USING NAMED<g2> USING NAMED<g3> WHERE { ?s ?p ?o } and I'd read it as a merge of <g1a> and <g1b> as the default graph. I take WITH to set the overall framework, and USING overrides by declaring a dataset by description. A case (3) is you can't have WITH and USING (it would be a syntax error). The argument is that WITH is used to connect the template and pattern parts; but the effects on pattern are controlled by the USING*, so use GRAPH in the template. Andy
Received on Wednesday, 4 May 2011 08:47:19 UTC