Hello Rob,

With current version of Virtuoso, I can't reproduce this error.

I get results like

 <result><binding
name="g"><uri>http://scot-project.org/scot/ns#</uri></binding></result>
 <result><binding
name="g"><uri>http://rdfs.org/sioc/ns#</uri></binding></result>

The codegen for this query is optimizer separately, so for XML results
it is

SQL> select sparql_to_sql_text ('define output:format "HTTP+XML
some/mime" SELECT DISTINCT ?g WHERE { GRAPH ?g { ?s ?p ?o } }');
sparql_to_sql_text
VARCHAR
_______________________________________________________________________________

SELECT DB.DBA.SPARQL_RSET_XML_HTTP (DB.DBA.SPARQL_RSET_XML_HTTP_PRE
(vector ( 'g' ), 'some/mime'), vector ( __box_flags_tweak ("s-1-0"."g",
1))) AS "aggret-0" INTEGER FROM (
  SELECT __box_flags_tweak ("s-1-0~pview".g_enum, 1) AS "g" FROM
DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS(return_iris, lim) (g_enum varchar)
"s-1-0~pview" WHERE "s-1-0~pview".return_iris=1  AND
"s-1-0~pview".lim=2147483647) AS "s-1-0"

where __box_flags_tweak flags the generated strings as IRIs and later
sparql_rset_xml_write_row_impl checks for this flag, as expected.

In your case, what are exact parameters of web service endpoint call?

Best Regards,

Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com
 

On Wed, 2011-03-02 at 05:42 -0800, Rob Vesse wrote:
> 
> Hi all
> 
> I've found what appears to be a major bug with Virtuoso's SPARQL
> results for one specific query namely:
> 
> SELECT DISTINCT ?g WHERE { GRAPH ?g { ?s ?p ?o } }
> 
> When this query is executed results come back as <literal> elements in
> the XML results rather than as <uri> elements.  If you remove the
> DISTINCT modifier then they come back as <uri> fine.
> 
> I assume that this is a bug in your optimisation of the above query
> since the above is commonly optimised specially since it is often used
> to list the graphs of a SPARQL endpoint.
> 
> Regards,
> 
> Rob Vesse



Reply via email to