Hello,

I'm having a problem when I try to recover inserted triples which had
xsd:boolean datatypes,  after insertion, they seem to be turned into
xsd:integer

Example:

SQL> TTLP ('
        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
        @prefix nameme: <http://foo.com/> .
        <http://foo.com/entity/1> nameme:hasFalse "false"^^xsd:boolean .
        <http://foo.com/entity/1> nameme:hasTrue "true"^^xsd:boolean .
        ', '', 'http://foo.com/entity/1' );

SQL> sparql define output:format "RDF/XML" construct { ?s ?p ?o} where
{graph <http://foo.com/entity/1> { ?s ?p ?o }};

And I get:

<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";>
        <rdf:Description rdf:about="http://foo.com/entity/1";>
                <n0pred:hasTrue xmlns:n0pred="http://foo.com/";
rdf:datatype="http://www.w3.org/2001/XMLSchema#integer";>1</n0pred:hasTrue>
        </rdf:Description>
        <rdf:Description rdf:about="http://foo.com/entity/1";>
                <n0pred:hasFalse xmlns:n0pred="http://foo.com/";
rdf:datatype="http://www.w3.org/2001/XMLSchema#integer";>0</n0pred:hasFalse>
        </rdf:Description>
</rdf:RDF>

Something similar happens when I store a value with datatype
xsd:decimal, where I get an xsd:double. And That is not what I want
since decimal and double are not the same.

Is there a direct way to keep the declared datatype?

Thank you.

Cristian

Reply via email to