Dear Sir/Madam,

Noticed one  strange thing while executing SPARQL queries on Virtuoso
through Virtuoso Sparql Query Form.

I have two queries( the only difference between them is absence of the order
by clause in the second query ) :

select distinct ?assocUri {?assocUri <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.w3.org/2002/07/owl#ObjectProperty>. } ORDER BY  ?assocUri

This query returns following data:

<?xml version="1.0" ?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://www.w3.org/2001/sw/DataAccess/rf1/result2.xsd";>
 <head>
  <variable name="assocUri"/>
 </head>
 <results distinct="false" ordered="true">
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#exemplarAliquot
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persChild
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persDZTwin
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persKinsman
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persMZTwin
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persParent
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persSample
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#persSibling
</literal></binding>
  </result>
  <result>
   <binding name="assocUri"><literal>
http://www.owl-ontologies.com/Ontology1220554345.owl#pers_ZTwin
</literal></binding>
  </result>
 </results>
</sparql>


The second query:

select distinct ?assocUri {?assocUri <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.w3.org/2002/07/owl#ObjectProperty>. }

This query returns :


<?xml version="1.0" ?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://www.w3.org/2001/sw/DataAccess/rf1/result2.xsd";>
 <head>
  <variable name="assocUri"/>
 </head>
 <results distinct="false" ordered="true">
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persDZTwin
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persKinsman
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persMZTwin
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#pers_ZTwin
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persSample
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persSibling
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persChild
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#persParent
</uri></binding>
  </result>
  <result>
   <binding name="assocUri"><uri>
http://www.owl-ontologies.com/Ontology1220554345.owl#exemplarAliquot
</uri></binding>
  </result>
 </results>
</sparql>


So If I have the order by clause in my query I get literals instead of
URI`s, and If I do not have order by clause I recieve URIs, as I would
expect.

Could I ask you to give some comments on this ?

Best regards,
S. Rikacovs.

Reply via email to