W3C home > Mailing lists > Public > semantic-web@w3.org > June 2012

Re: Template language for SPARQL?

From: Scott Henninger <shenninger@topquadrant.com>
Date: Thu, 31 May 2012 21:38:11 -0500
Message-Id: <C6BF509D-7D2B-4EC2-81C8-CF12DE6B0641@topquadrant.com>
To: semantic-web <semantic-web@w3.org>
Note that the RDF syntax used in TopBraid is optional. Queries can be saved as strings and there are various ways to specify variables using a {?varName} syntax.

The SPIN syntax is not intended for human use. All queries are edited in SPARQL string syntax.

BTW, one advantage of representing queries in RDF, from an editor perspective, is that models can be refactored without needing to modify queries.  Since query elements are RDF nodes, changing the model changes the query automatically and correctly.

-- Scott

On May 31, 2012, at 8:45 PM, David Booth <david@dbooth.org> wrote:

> [Resending, as my previous message never showed up.]
> I would like to be able to write something like this:
>  SELECT ?s
>  WHERE { ?s a ${CLASS} . }
> and have ${CLASS} substituted in from an environment variable or other
> parameter, but SPARQL does not currently provide anything like this, and
> it's clearly beyond what the working group could put in SPARQL 1.1.  
> So I'm wondering . . . 
> What have others been using as a template language for SPARQL?  
> I know TopQuadrant uses an RDF representation for SPARQL CONSTRUCT
> queries in conjunction with SPIN, 
> http://www.w3.org/Submission/2011/02/ 
> but it shreds the SPARQL query into tiny RDF pieces, which is rather
> unfriendly for a human to read.  It would be much nicer to have
> something like the above.
> How are others handling the need to parameterize their SPARQL queries
> like this?
> -- 
> David Booth, Ph.D.
> http://dbooth.org/
> Opinions expressed herein are those of the author and do not necessarily
> reflect those of his employer.
Received on Friday, 1 June 2012 02:38:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:48:37 UTC