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

Re: SPARQL Variable Binding Results XML Format

From: Damian Steer <damian.steer@hp.com>
Date: Sun, 16 Jan 2005 15:51:22 +0000
Message-Id: <7830AC5E-67D6-11D9-BD7E-000D932B9016@hp.com>
To: public-rdf-dawg-comments@w3.org

Hash: SHA1


Some poorly though out suggestions from someone ill-qualified to 
comment on XML.

1) Schema validation.

Since variable names are used as element names this seems to prohibit 
some useful validation. I'm no expert (by along way) but it seems that 
something along the lines of:

	<var name="a" ...> ... </var>

would give the XML schema languages more help. Even better (perhaps) is 
using the element to type the result:


so, e.g., one could prohibit datatype and lang on uris, bnodes and 
unbound values.

However I appreciate that the xpaths are nicer for a known set of 
variables with the current scheme. (Incidentally, it does seem odd that 
the variable names appear as attribute values in <head> but not in 

2) Homogeneity of results.

There are four basic kinds of result: uri, bnode, literal, unbound. 
Testing for these is a bit awkward, and (worse) how one accesses the 
value of the variable depends on the type. (sidenote: is bound="true" 
the default?)

It's not possible (afaict) to go through each binding and print out the 
type and independently the value, as your example result-to-html.xsl 

How about always having the value as a (text) child (though see below) 
and use a 'type' attribute?

<x type="bnodeid">r2</x>
<hpage type="uri">http://work.example.org/bob/</hpage>
<age type="literal" 
<blurb type="unbound"/>

3) XML Literal Content.

I see that XML literal content is escaped in output.xml. Yuck :-) 
Please don't do that.

- ------

Hope this all made sense. Good luck with sparql,

Version: GnuPG v1.2.4 (Darwin)

Received on Sunday, 16 January 2005 15:52:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:05 UTC