W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2005

Re: definition of "SPARQL Query", sharing between QL and protocol specs

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 16 May 2005 15:58:11 +0100
Message-ID: <4288B503.2000907@hp.com>
To: Dan Connolly <connolly@w3.org>
CC: RDF Data Access Working Group <public-rdf-dawg@w3.org>



Dan Connolly wrote:
> I just noticed...
> 
> "The query is composed of sparql-query: an XML Schema string simple
> type, conforming to the grammar contained in the SPARQL Query Language
> for RDF [SPARQL-QL] specification."
>  -- http://www.w3.org/2001/sw/DataAccess/proto-wd/ 1.35
> 
> I worked with EricP to make a specific term for that...
> 
> "A SPARQL query is a sequence of characters in the language defined by
> the following grammar, starting with the Query production."
>  -- http://www.w3.org/2001/sw/DataAccess/rq23/
>   1.330
> 
> So the protocol spec should import the term "SPARQL query" from
> the QL spec; i.e. hypertext link directly to it. It's probably
> worth declaring a subtype of xs:string for it too.
> 
> An now that definition doesn't look quite right to me...
> the grammar doesn't use characters as its terminals.
> 
> Things like whitespace are treated outside the grammar,
> and there are multi-character terminals such as 'BOUND'.
> 
> "A SPARQL query is a sequence of characters that correspond
> to a sequence of tokens that is in the language
> defined by the grammar below."
> 
> Ugh. a mouthful. But correct, and since it goes at the
> end of the spec, we won't lose any readers over it.
> 
> The lexical details could be more explicit; we need to
> be clear how character sequences correspond to token
> sequences; perhaps what's there is clear enough.
> It might be nice to list all the tokens, or
> token types, for example.

Different implementations may choose to tokenize differently (e.g. something 
that just spots "words" and does the rest in the parser).  Handling the many 
keywords can be done differently WRT the parser/lexer split.  One possibility 
for the tokens is distinguished - the are uppercase.

> 
> Using "SPARQL query" for the concrete string form as opposed
> to the abstract form doesn't seem to be an obvious choice...
> what did you choose for the abstract syntax, Andy?
> 
> I see DataSet Graph Pattern... but I don't see anything
> that includes a CONSTRUCT clause... I suppose a CONSTRUCT
> clause is just a Graph Pattern.
> 
> Ah...
> 
> [[
> Definition: SPARQL Query
> 
> A SPARQL query is a set of a result form, a graph pattern, and a number
> of solution sequence modifiers.
> ]]
> 
> Collision! Perhaps "SPARQL Query string" for the concrete form
> and keep "SPARQL Query" for the abstract form?

Yes, that's better - "SPARQL Query string" for the concrete form.

> 
> I think you mean tuple, not set, by the way...

A tuple is an ordered sequence - the order does not (abstractly) matter.  A 
query is a thing that needs each of these parts so it's set of things (presumed 
self describing).  "Tuple" is a bit implementation-y.

	Andy
Received on Monday, 16 May 2005 16:43:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:23 GMT