W3C home > Mailing lists > Public > public-sparql-dev@w3.org > January to March 2008

Re: How to convert sparql results into html format

From: Danny Ayers <danny.ayers@gmail.com>
Date: Mon, 4 Feb 2008 21:55:11 +0100
Message-ID: <1f2ed5cd0802041255r539c64b0v8f09e4477ca3505b@mail.gmail.com>
To: axel@polleres.net
Cc: shylaja.sannegowda@wipro.com, public-sparql-dev@w3.org

> > Please let me know how I should convert sparql results into html format.

It should be pretty straightforward using the JSON results format, but
I don't recall an example using this - anyone?

There's another generic-HTML XSLT in the results spec doc, as well as
an XQuery alternative:

http://www.w3.org/TR/rdf-sparql-XMLres/#vb-examples

Here's another XSLT, from Morten Frederiksen (which I may have tweaked
- can't find link to the original):
http://n2.talis.com/svn/playground/danja/sparql-demo/sparql-html.xsl

For a specific kinds of data, it's probably easiest to tweak an
existing XSLT for some other kind of data, e.g.
http://n2.talis.com/svn/playground/danja/reviews/xslt/tutorial-list.xsl

- that one calls another xslt to deal with url-encoding, but more
probably common is the need to correctly escape HTML content within
the results - key to that is disable-output-escaping="yes" an example
which uses that is:

http://n2.talis.com/svn/playground/danja/twitcrit/twitcrit-list.xsl

Cheers,
Danny.

-- 
http://dannyayers.com
~
http://blogs.talis.com/nodalities/this_weeks_semantic_web/
Received on Monday, 4 February 2008 20:55:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 4 February 2008 20:55:22 GMT