Re: SPARQL Variable Binding Results XML Format draft - for review

On 14/12/2004, at 0:34, Dave Beckett wrote:

>
> I've updated
>   SPARQL Variable Binding Results XML Format
>   http://www.w3.org/2001/sw/DataAccess/rf1/
>
> to include some words as well as example, rdf query, xslt, XML Query
> and outputs.  There are a few issues:
>
>      ISSUE: This is a problem, you cannot distinguish a bound variable
>      value with an empty string literal, from a variable with no
>      binding.
>
> Either go with <var empty="something"/"> or omit the <var/>?


>      ISSUE: XML style - rename variables to header or head?
>
> But I can't think of anything else that'd go in the header at present.
>
>      ISSUE: Normativeness of the XML schemas. Pick one?

I don't think the <variables> element defined in section 2.2 of the 
current document shouldn't use empty XML elements to represent the 
variables.  The reason this isn't a good idea is that the variable 
elements no longer have a consistent type throughout the document.  For 
example, I can't assume that <x/> is always the variable ?x and that I 
should always expect it to have attributes or element content that 
represent the RDF node that ?x is bound to.  I have to check the parent 
element, either <variables/> or <result/> to figure out in which 
context I should be interpreting <x/>.

I'm not familiar with RELAXNG, but I'm of the impression that XML 
Schema supports space-delimited lists of qnames or tokens as a simple 
type.  I'd suggest that something like

<results variables="x y z">
   <result>
     <x>foo</x>
     <y>bar</y>
   </result>
   <result>
     <x>baz</x>
     <z>quux</z>
   </result>
</results>

would give every element a consistent type.  Do we need the outermost 
<dawg-result> element?

Received on Tuesday, 14 December 2004 14:23:51 UTC