[redland-dev] handling literals using Redland

Markus Liechti jokaero at hellhound.ch
Tue May 22 18:39:45 BST 2007


hi there,
I'm having problems handling literals (floats in my case) using Redland.

I've created an OWL File in Protégé. Here is an extract:

     <Coordinate rdf:ID="Coordinate05">
         <hasXCoordinate rdf:datatype="&xsd;float">-5.0</hasXCoordinate>
         <hasYCoordinate rdf:datatype="&xsd;float">5.0</hasYCoordinate>
         <hasZCoordinate rdf:datatype="&xsd;float">-5.0</hasZCoordinate>
     </Coordinate>

If I execute the following SPARQL query ...

PREFIX url: <http://www.blabla.com/ontologies#>

SELECT ?coord ?value
WHERE
{
   url:Coordinate05 ?coord ?value .
FILTER (?value > 0.0) .
}

... using the built in Protégé tool, I get the result:
hasYCoordinate	5.0

which is the result I would expect.

executing the same query using the Redland (http://librdf.org/query), I get:
coord 	value
http://www.jokaero.com/ontologies#hasZCoordinate 
-5.0^^<http://www.w3.org/2001/XMLSchema#float>
http://www.jokaero.com/ontologies#hasYCoordinate 
5.0^^<http://www.w3.org/2001/XMLSchema#float>
http://www.jokaero.com/ontologies#hasXCoordinate 
-5.0^^<http://www.w3.org/2001/XMLSchema#float>

which is obviously not correct.
What am I doing wrong? Is there a problem with Redland or with my OWL 
file which you can find here:
http://www.jokaero.com/ontologies/SimpleMesh.owl

please help :-)
cheers Markus


More information about the redland-dev mailing list