Re: Querying Named Graph using SPARQL

> [[
> The group pattern:
>  { }
> matches any graph (including the empty graph) with one solution that does not bind any variables.
> ]]

This only means that upon

 SELECT ?G WHERE { GRAPH ?G {} }

also empty named graphs should be returned, which would not be the case for 

 SELECT ?G WHERE { GRAPH ?G { ?S ?P ?O } }

Obviously, this makes a difference for all graph stores that support empty named graphs.
So, to my understanding at least, this is not a bug in the spec.

HTH,
Axel

On 13 Aug 2013, at 20:21, David Booth <david@dbooth.org> wrote:

> Hi Axel,
> 
> That doesn't work in Sesame 2.7.1 at least, apparently because ?G is not bound, even though there is one solution.  The SPARQL 1.1 spec says:
> http://www.w3.org/TR/sparql11-query/#emptyGroupPattern
> [[
> The group pattern:
>  { }
> matches any graph (including the empty graph) with one solution that does not bind any variables.
> ]]
> 
> Is this a bug in the spec?
> 
> David
> 
> On 08/13/2013 11:48 AM, Axel Polleres wrote:
>> Hi Quentin,
>> 
>> how about just
>> 
>>  SELECT ?G WHERE { GRAPH ?G {} }
>> 
>> (no need to dump all triples, if the only concern is which ?G exist)
>> 
>> BTW, public-sparql-dev@w3.org may be the list you wanted to use.
>> 
>> best,
>> Axel
>> 

Received on Tuesday, 13 August 2013 19:11:03 UTC