As Andy has pointed out it is the decimal separator that is the problem.

SPARQL defers to XML Schema Datatypes for its datatype support and that 
mandates certain lexical forms for datatypes including the use of ‘.’ As the 
decimal separator as opposed to ‘,’ in your data.

Assuming that you control the source of the data prior to it becoming RDF it 
would be best to try and fix the conversion of the data at that stage.

If you don’t control the data then your best option is probably to create an 
extension function within Jena that is capable of parsing the Values in the 
format given in the data and use this in place of the xsd:float() function. 
Please see the following documentation for more guidance:


On 16/09/2016 09:33, "Andy Seaborne" <> wrote:

    On 15/09/16 22:56, lookman sanni wrote:
    > Hi all,
    > I am trying to perform a filter in a SPARQL query, through the below code:
    > FILTER ( abs(xsd:float(?tAmount1)) = abs(xsd:float(?tAmount2)) )
    > The query is being parsed correctly, but I am not getting the expected
    > result. Any clue why this would not convert and compare those amounts
    > properly ? The amounts are formatted like this: "+8644,00".
    > Thanks in advance for the help.
    In XSD, floats have "." not "," for the decimal separator.

Reply via email to