Re: XML serialization of SPARQL

On Wed, Mar 16, 2005 at 03:37:09 -0500, Eric Prud'hommeaux wrote:
> Bijan was saying that he wants an XML serialization for SPARQL.
> 
> While on IRC with Hugo, I doodled:
> 
>   CONSTRUCT { ?a foo ?b . ?b bar ?c }
>       WHERE { ?b thoip ?c . ?c fump ?d . ?a wonk ?d }
> 
>  =>
> 
>   <sparql>
>     <construct>
>       <term><s var="a"/><p uri="foo"/><o var="b"/></term>
>       <term><s var="a"/><p uri="foo"/><o var="b"/></term>
>     </construct>
>     <where>
>       <term><s var="b"/><p uri="thiop"/><o var="c"/></term>
>       <term><s var="c"/><p uri="fump"/><o var="d"/></term>
>       <term><s var="a"/><p uri="wonk"/><o var="d"/></term>
>     </where>
>   </sparql>

I have an alternative suggestion:

	<sparql>
	  CONSTRUCT { ?a foo ?b . ?b bar ?c }
	  WHERE { ?b thoip ?c . ?c fump ?d . ?a wonk ?d }
	</sparql>

In seriousness the XML serialisation better be pretty close to the grammar
or it is a bit too much of a PITA for very little gain.

> I can see that this would enable one to use a SOAP SPARQL Protocol
> binding to sign and/or encrypt. There may be other motivations.
> What are they?

Validating inputs I think, but the rules for validating SPARQL expression
are sufficiently complicated that I dont think youre going to be able to
express them in schema or whatever. e.g. how do you say that variable that
appear only in optional blocks may only appear in one.

- Steve

Received on Wednesday, 16 March 2005 09:27:33 UTC