What Open Source framework can autogenerate HTML for SPARQL output?

I am looking for an overview of solutions for Open Source web frameworks which use some HTML template mechanism and creates the content HTML directly from a SPARQL query I define? That is, I want to pass the web framework the SPARQL query and not have to care about creating the HTML GUI stuff for displaying the results. The framework would analyze the SPARQL itself, see how many fields it can expect and create HTML accordingly, allowing me to simply care about the SPARQL itself.

Preferably, the output would be Ajax-using XHTML+RDFa output, but at the moment I would settle for anything. The framework should allow something along the lines of this pseudo code:

sparql = "SELECT WHERE ...";

insert("header");
insert(query(remoteServerURL, sparql));
insert("footer");

The results should be more fancy than a simple table, and preferably even allow me to specify how certain data types should be visualized. For example, a object property of type xsd:date to be automatically converted into a calendar widget?

Hi Egon,

As I see it two solutions will cover your need. One is an XSLT stylesheet that transforms the SPARL XML results from a SELECT or ASK query into XHTML with RDFA. As the previous poster mentioned a stylesheet that gets you part way there exists in Joseki. There is also a stylesheet referenced in the SPARL Query Results doc

Hi Egon,

I've played with Jena, Arq and apache Velocity to generate some HTML from various sources.

See my blog post about it.

As far as I remember Joseki has the ability to process the returned SPARQL Resultset data with a XSLT template. When you issue a query in the web interface of Joseki, that's the way the resulting HTML page is generated. Should not be a too big problem to provide another XSLT script if you want to change something there.