- From: Jeen Broekstra <jeen.broekstra@aduna.biz>
- Date: Mon, 12 Dec 2005 12:11:37 +0100
- To: Steve Harris <S.W.Harris@ecs.soton.ac.uk>
- CC: RDF Data Access Working Group <public-rdf-dawg@w3.org>
Steve Harris wrote:
> On Fri, Dec 09, 2005 at 03:43:30PM +0000, Steve Harris wrote:
[snip]
>>+1, though I'd like to see how much more it complicates XSLT processing,
>>as that was more of a concern IIRC.
>
>
> Duh, they were in Ron's original message.
Actually, not quite (unless I missed something). Ron used XSLT to
produce the stripped and collapsed versions of the file, but he didn't
use XLST to test processing the different result variations, he just
timed the run of xmlwf (Expat's wellformedness checker). Since a
wellformedness test does not do any matching of the result values to the
correct column it does not really tell us much about processing
performance when we actually have to interpret/validate the result file,
unfortunately. However, the tests I ran with SAX-based processing did do
this kind of interpretation and there we still saw a substantial
performance gain.
My XSLT skills are sketchy at best so I haven't yet figured out how to
adapt a stylesheet to cope with the collapsed format. The best I could
come up with is that you insert some sort of position-based test in the
processing of the binding element, e.g:
<xsl:for-each select="res:binding">
<xsl:variable name="bindingName" select="@name" />
<xsl:variable name="bindingPosition" select="position()"/>
<xsl:if test="//res:head/res:variable[$bindingPosition]/@name !=
$bindingName">
<td>null</td>
</xsl:if>
...
But this only works when there is a single unbound: you'd need some sort
of recursion to have this work for arbitrary numbers of missing values,
I guess.
If you (or someone else) feel like taking a stab at getting this to work
and sharing how difficult/easy it is to get this right, there is a
stylesheet for rendering sparql results (in LC format of course) in HTML
available at http://www.w3.org/2001/sw/DataAccess/rf1/result2-to-html.xsl.
Cheers,
Jeen
--
Jeen Broekstra Aduna BV
Knowledge Engineer Julianaplein 14b, 3817 CS Amersfoort
http://aduna.biz The Netherlands
tel. +31 33 46599877
Received on Monday, 12 December 2005 11:13:42 UTC