Re: SPARQL Variable Binding Results XML Format

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

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:

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

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

<uri>
<literal>
<bnode>
<unbound>

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 
<result>).

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 
shows.

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" 
datatype="http://www.w3.org/2001/XMLSchema#integer">30</age>
<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,

Damian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB6o2AAyLCB+mTtykRAtI0AJ4qfA5yjogebQwwVuKxUfMsTutBWACffEvW
KZ6qxoFAO1gEPbeFehPtVrk=
=f12B
-----END PGP SIGNATURE-----

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