hi

When SPARQL queries RDF and returns a result set,it is of tabular form. Can any one tell me how to get different views of the result that is got.ex) as ordered list,etc. Thank you

asked 07 Jan '12, 06:11

sheba%20wilfred's gravatar image

sheba wilfred
475
accept rate: 0%


Basically, there are two ways to return results using SPARQL - a result set (SELECT) or a RDF graph (CONSTRUCT). Result sets can be ordered through ORDER BY. Post-processing to an ordered list of results or other views would need to be performed by the entity receiving the query results.

permanent link

answered 07 Jan '12, 13:02

scotthenninger's gravatar image

scotthenninger ♦
7.5k813
accept rate: 17%

Thank You for your reply sir.Can you please tell me how this post-processing be done with an example? As i am new to this area, your example will be helping me to understand this more clear.

(09 Jan '12, 02:34) sheba wilfred sheba%20wilfred's gravatar image

A SPARQL endpoint will typically return the query result in XML or JSON format (in the case of SELECT queries), or as some RDF serialization such as RDF/XML or Turtle (in the case of CONSTRUCT queries). It is up to your application to process that result, for example (in the case of XML) by applying an XSLT stylesheet to it, or by processing it in code.

We cannot tell you how to do this in detail, because we do not know what tools you are working with and what your application looks like.

permanent link

answered 12 Jan '12, 18:54

Jeen%20Broekstra's gravatar image

Jeen Broekstra ♦
11.5k412
accept rate: 38%

edited 13 Jan '12, 00:39

If you're using Virtuoso, its SPARQL endpoint supports a choice of several output formats - spreadsheet, XML, JSON, CSV amongst others. If you have other formats in mind, you can simply XSLT the SPARQL resultset directly (it being application/sparql-results+xml).

permanent link

answered 12 Jan '12, 12:59

Tim.Haynes's gravatar image

Tim.Haynes
26513
accept rate: 8%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,289

question asked: 07 Jan '12, 06:11

question was seen: 1,374 times

last updated: 13 Jan '12, 00:39