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

Re: XML serialization of SPARQL

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Wed, 16 Mar 2005 16:04:35 +0000
Message-ID: <42385913.50505@hp.com>
To: kendall@monkeyfist.com
Cc: Eric Prud'hommeaux <eric@w3.org>, public-rdf-dawg@w3.org

Kendall Clark wrote:
> On Wed, Mar 16, 2005 at 03:37:09AM -0500, Eric Prud'hommeaux wrote:
> 
>>Bijan was saying that he wants an XML serialization for SPARQL.
>>
>>While on IRC with Hugo, I doodled:
> 
> 
> I've rewritten the first 20 queries in rq23 as XML, and I've done
> this now 2 times -- trying to get a feel for what this XML
> serialization should look-n-feel like. The present state of it is
> pretty much useful as an AST for a SPARQL parser, since Bryan Thompson
> and I pretty much just synched up on that effort.

Better would be to capture the abstraction of the query and not specific to a
parser.  For example, I do not retain any of the syntax sugaring, expanding it
all at parse time once and for all.

SPARQL/QL is defined abstractly (basic pattern, group, union, optional, graph,
filter) and if the structure of the XML reflected that then tools wishing to
analysis/manipulate queries would have an eaiser to use form.  If queries are
constructed in an XML-based tool, then the abstract form woudl be the output,
not the strangeness of the text syntax.

Pretty printers are fun to write - it is quite easy to write one if it assumes
the triple layout of the parser (i.e. parsrs and pretty printers come in pairs -
rather likely in teh same toolkit) yet does not require recording syntactic
forms in the parse tree.

> 
> Once I've finished rewriting the remaining dozen or so queries from
> rq23, and worked on a schema for all of this, I'll share it with the
> group. I've started work on a specification for the serialization, but
> it'll be a little while longer yet.
> 
> (One thing that would have made this easier is if rq23 were
> well-formed, so I could have extracted all the <pre class="query">
> bits by machine. I used a "tag soup" parser and got most of them,
> though.)

I'd also like that - to extract all relevant examples as test cases.

Fixing and sending the diffs would be great - at least a version ref would help.
   It passes through "tidy -xml" but that does get run so things can creep in.

> 
> Kendall
> 
> PS--Yeah, I know, this isn't protocol work per se, but there are
> connections and dependencies, I think, between our
> on-the-wire/exchange serialization and the protocol, so I don't feel
> like it's wasted or irrelevant effort.
> 

Could you say what connections and dependencies you are discovering?


Just asking but is it proposed that a SPARQL/XML syntax be part of our Last Call
bundle of docs?  Or is it a WG note?  Something else?

Should there be an RDF encoding of the query structure?  If we want multiple 
syntaxes, a shared abstract model of a query encoded into various forms would be 
  cool.

	Andy
Received on Wednesday, 16 March 2005 16:04:50 GMT

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