W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > August 2005

SPARQL variable names syntax

From: Walid Maalej <maalejw@in.tum.de>
Date: Tue, 2 Aug 2005 21:37:08 +0200
To: <public-rdf-dawg-comments@w3.org>
Cc: "'Patrick Renner'" <renner@in.tum.de>
Message-Id: <20050802193708.4AE45CF@mail.informatik.tu-muenchen.de>

Dear RDF Data Access Working Group Members,

In the last working draft of the 21st. of July 2005, changes have been done
concerning the definition of the variable names within a SPARQL query.
The syntax is specified under 
http://www.w3.org/TR/rdf-sparql-query/#rVARNAME .
I'm wondering if there is any reason not to allow the underscore "_" at the
Beginning of a variable name from the grammar point of view.
This could be very useful for application that build SPARQL queries
automatically and call the variables like the RDF:ID of the searched
resource.

Let's suppose we have the following data
<http://example.org/book1> <http://properties.com/_title> "SPARQL Tutorial".

A Generated query could look like:

PREFIX  exp: <http://example.org/>
PREFIX  pro: <http://properties.com/>
SELECT  $_title
WHERE   { exp:book1  pro:_title  $title }

In general, SPARQL based application developers should not care about
calling the variables. It should be possible to just take over the RDF
Property ID with a "?" as a prefix. Thus, I think that, the syntax of NCNAME
http://www.w3.org/TR/rdf-sparql-query/rNCNAME should be equal to that of
variable names.

I would be very glad and thankful for your considerations and for any
explanations or remarks.

Best Regards
--------------------------
Walid Maalej
Technical University of Munich
Web:    www.in.tum.de
Received on Wednesday, 3 August 2005 06:16:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:49 GMT