Re: XML format for SPARQL queries?

There was SPARQLX [1], but I guess it didn't gain traction.

For my money, an isomorphic xml syntax for sparql does not add much value. Better to use real rule language that exposes the logical structure of queries. I have used RIF for this, with an xslt transformation to sparql.

Regards,
--Paul

[1] https://www. w3.org/2009/sparql/wiki/SPARQLX

> On Jun 19, 2017, at 13:52, McCauley, Steven <steven_mccauley@brown.edu> wrote:
> 
> Martynas- nothing! I wasn't suggesting there was anything wrong with SPIN, just that I don't think it's what I'm looking for. As the abstract says ( http://spinrdf.org/sp.html ), SPIN "goes beyond the textual format." I want to head in the opposite direction: a serialization of a SPARQL query that is document-oriented; ie, XML.
> 
> Olivier- thanks for the link. I'm not surprised that I'm the first person to suggest this, but I do think it's an interesting omission. Given that a query can be submitted to a SPARQL endpoint as a document, the Web standards enthusiast in me wants to use an XML format to do so.
> 
> An XML format for SPARQL queries would create a nice symmetry with replies in RDF/XML and SPARQL Query Results XML formats. It would permit an XML end-to-end processing chain, using the same tools to generate queries and to process the results from those queries. Many thanks for the advice; if I make any headway on my own, I'll post to the list. (Mapping SPIN into XML seems like a good way to start.)
> 
> Best-
> Steve
> 
>> On Sun, Jun 18, 2017 at 11:58 AM, Martynas Jusevičius <martynas@atomgraph.com> wrote:
>> What's wrong with SPIN?
>> 
>>> On Fri, Jun 16, 2017 at 6:45 PM, McCauley, Steven <steven_mccauley@brown.edu> wrote:
>>> Hello-
>>> 
>>> I was wondering, is there an XML format for encoding SPARQL queries and update requests? That is, a format which serializes this:
>>> 
>>> """
>>> SELECT ?s ?p ?o
>>> WHERE {
>>>   ?s ?p ?o .
>>> }
>>> """
>>> 
>>> as this:
>>> 
>>> """
>>> <?xml version="1.0"?>
>>> <query xmlns="http://fake.org/sparql-query#">
>>>   <clause type="select">
>>>     <binding name="s" />
>>>     <binding name="p" />
>>>     <binding name="o" />
>>>   </clause>
>>>   <clause type="where">
>>>     <triple>
>>>       <subject>s<subject>
>>>       <predicate>p</predicate>
>>>       <object>o</object>
>>>     </triple>
>>>   </clause>
>>> </query>
>>> """
>>> 
>>> (or, you know, something else that could actually be processed)
>>> 
>>> I ask because I know I can get my SPARQL results in XML (either sparql-results or rdf+xml), so it wouldn't surprise me if a format for SPARQL queries was also available. I've checked the mailing list archives, and the current list of W3C standards and drafts, but I'm not seeing anything like this. There's SPIN, but that seems to be moving in the opposite direction from what I'm looking for.
>>> 
>>> Being able to serialize queries in XML would make them easier to log and rollback (for updates, that is). It would also permit the use of XML tools for generating SPARQL queries. Currently, I'm accomplishing this in my scripts with a lot of string concatenation and string formatting, but that seems flimsy and unreliable. I don't think it would be impossibly hard to write my own schema for a SPARQL Query document, but I also don't want to reinvent the wheel.
>>> 
>>> Thank you-
>>> Steve McCauley
>> 
> 

Received on Monday, 19 June 2017 19:48:18 UTC