Hi,
I have this data:

----
<foo:bar1> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#int> .
<foo:bar2> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#integer> .
<foo:bar3> <foo:p> "6"^^<http://www.w3.org/2001/XMLSchema#int> .
<foo:bar4> <foo:p> "6"^^<http://www.w3.org/2001/XMLSchema#integer> .
----

I load it:

tdbloader --loc /tmp/tdb data.nt

Then I dump it out:

tdbdump --loc /tmp/tdb

---
<foo:bar1> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#int> .
<foo:bar2> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#integer> .
<foo:bar3> <foo:p> "6"^^<http://www.w3.org/2001/XMLSchema#integer> .
<foo:bar4> <foo:p> "6"^^<http://www.w3.org/2001/XMLSchema#integer> .
----

I am not sure if these two triples in my data are both "correct", are they?

----
<foo:bar1> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#int> .
<foo:bar2> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#integer> .
----

They appear to be correct, I tried with http://sparql.org/data-validator.html
and Jena rdfcat or rdfparse commands. No errors.

Also:

<foo:bar3> <foo:p> "6"^^<http://www.w3.org/2001/XMLSchema#int> .

has been dumped out as:

<foo:bar3> <foo:p> "6"^^<http://www.w3.org/2001/XMLSchema#integer> .

This is because TDB value canonicalization:
http://openjena.org/wiki/TDB/ValueCanonicalization

However, I am not sure I understand why this does not happen for:

<foo:bar1> <foo:p> "6.0"^^<http://www.w3.org/2001/XMLSchema#int> .

To further clarify my doubts on the difference between xsd:int and xsd:integer
I went to double check here:

 - http://www.w3.org/TR/xmlschema-2/#int
 - http://www.w3.org/TR/xmlschema-2/#integer

I think everything is fine and working as it is supposed to work,
but a confirmation would be good!

Thanks,
Paolo

Reply via email to