-2

I am newbie in Apache Jena.I store my RDF-dataset in jena tdb and I serve it in fuseki server.Until now,I am fine.The problem is that I want the output of the SPARQL query to be displayed in a html page.I can't find the way to do this. If you have ideas,do not hesitate to share them with me!

evaliotiri
  • 33
  • 1
  • 9
  • See http://stackoverflow.com/questions/31307532/output-format-in-jena-fuseki-server, maybe? – YMomb Aug 23 '16 at 08:48
  • Thank you for your answer! I was searching for a Linked Data interface to SPARQL endpoints such as Pubby. – evaliotiri Oct 27 '16 at 23:03

1 Answers1

1

For part of a page, you need to write a small piece of code that takes a result set and creates the HTML in the format and styling that you want.

You can add an XML stylesheet with "?stylesheet=" but that will get you a whole page.

See this example at www.sparql.org.

http://www.sparql.org/books/sparql?query=PREFIX+books%3A+++%3Chttp%3A%2F%2Fexample.org%2Fbook%2F%3E%0D%0APREFIX+dc%3A++++++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0ASELECT+%3Fbook+%3Ftitle%0D%0AWHERE+%0D%0A++%7B+%3Fbook+dc%3Atitle+%3Ftitle+%7D&output=xml&stylesheet=%2Fxml-to-html.xsl

AndyS
  • 16,345
  • 17
  • 21