[Mulgara-general] SPARQL Endpoint format parameter

Paul Gearon gearon at ieee.org
Mon Jul 27 16:43:44 UTC 2009


On Mon, Jul 27, 2009 at 9:43 AM, Alex Hall<alexhall at revelytix.com> wrote:
> Chuck Borromeo wrote:
>> Hi Paul,
>>   I downloaded the Mulgara 2.1.2 binary and tested my queries again.  I was able to get JSON results using 2.1.2.  However N3 and  RDFXML still don't work for a SELECT query.  Setting the format parameter to N3 and RDFXML still returns Sparql/XML.
>
> In the general case, it isn't possible to send results from a SELECT
> query as N3 or RDF/XML.  Both of these formats are designed to serialize
> RDF triples.  The answer from a SELECT query is just a result set with
> an arbitrary number of columns.  The only output types that support
> generalized query result bindings are SPARQL/XML and JSON.

SELECT queries can only return the SPARQL-XML result format, or JSON.
I believe that I force requests for RDF/XML and N3 to return
SPARQL-XML results.

CONSTRUCT queries can return RDF/XML, N3 and JSON. But if you select
SPARQL-XML results, then I force it over to RDF/XML.

This seemed pragmatic at the time, but I suppose I should actually be
reporting the problem.

> In principle, you could serialize results from a SELECT query using N3
> or RDF/XML, *if* the result set has three columns and *if* the results
> can be interpreted as legal statements (i.e. no literals in the first
> column, only URI's in the second column).  But that's a very specialized
> case, and one that we don't support at the moment.

No, we really don't want that at all. It breaks the notion of a SELECT
vs. a CONSTRUCT. It's actually trivial to do (internally a CONSTRUCT
is just a SELECT with a multiple of 3 columns), but we won't be doing
it by design.

Paul



More information about the Mulgara-general mailing list