The XSLT and XQuery files come from the Data Access Working Group examples. result-to-html.xq result-to-html.xsl See http://www.w3.org/TR/rdf-sparql-XMLres/