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

Re: Bindings in the DESCRIBE clause

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sun, 03 Jun 2012 18:43:58 +0100
Message-ID: <4FCBA25E.7060404@epimorphics.com>
To: public-rdf-dawg-comments@w3.org


On 03/06/12 17:50, Peter Waher wrote:
> Hello Andy
>
> Thanks for the quick response.
>
> I'll take your word for it. Looking at the document you linked to, I cannot see that the grammar has been updated to include variable bindings in the DESCRIBE clause [11], as is allowed in [9] for SELECT:
> http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#sparqlGrammar
>
> Sincerely,
> Peter Waher

I understood your reference to "bindings" to be the keyword in the 
SPARQL language as theer had been a grammar problem with the query forms.


Expressions are not allowed in DESCRIBE. They weren't in SPARQL 1.0 
because only terms from the target graph can be returned from a query.

In SPARQL 1.1 with assignment (select expressions, or BIND), it is 
possible to calculate new terms but it is always to a named variable. 
The AS keyword is needed.

SELECT expressions are a shorthand for a BIND assignment, and give a 
name to the result variable.  It is shorthand as the algebra translation 
puts in the same algebra operator.

DESCRIBE, and CONSTRUCT, can include BIND, or a subquery.  This can 
include COALESCE.  The shorthand syntax of SELECT sits a little at odds 
with DESCRIBE and CONSTRUCT as they do not have output variables.

	Andy

> -----Original Message-----
> From: Andy Seaborne [mailto:andy.seaborne@epimorphics.com]
> Sent: den 3 juni 2012 17:32
> To: public-rdf-dawg-comments@w3.org
> Subject: Re: Bindings in the DESCRIBE clause
>
> Hi Peter,
>
> This has been fixed
>
> http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#sparqlGrammar
>
>
> By the way: BINDINGS is set to change to generalise it -- some discussion:
>
> http://lists.w3.org/Archives/Public/public-sparql-dev/2012AprJun/0018.html
>
> 	Andy
>
> On 03/06/12 13:00, Peter Waher wrote:
>> Hello
>>
>> Any reason why bindings in the DESCRIBE clause using expressions is
>> not permitted in SPARQL 1.1, when they are permitted in the SELECT clause?
>>
>> Compare [11] and [9] in:
>>
>> http://www.w3.org/TR/sparql11-query/#sparqlGrammar
>>
>> Example: Describe the first iri that is well defined, using the
>> COALESCE function.
>>
>> This could be done using BIND [62], but a SPARQL user would expect
>> syntax to be consistent.
>>
>> Sincerely,
>>
>> Peter Waher
>>
>
>
Received on Sunday, 3 June 2012 17:44:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 3 June 2012 17:44:28 GMT