W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2011

Re: ACTION-419: Sync with Birte on Datatypes for canonicalisation

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Tue, 29 Mar 2011 18:04:54 +0100
Cc: Matthew Perry <matthew.perry@oracle.com>, Andy Seaborne <andy.seaborne@epimorphics.com>, W3C SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <F1F6C86F-4774-45E3-8354-8750A3313043@cs.man.ac.uk>
To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
On 29 Mar 2011, at 17:54, Birte Glimm wrote:

> Hm, so "01"^^xsd:integer becomes "1.0"^^xsd:decimal?
> That's what we do in HermiT since otherwise you wouldn't be able to
> properly implement OWL reasoning with facets, but then I don't
> understand the XML Schema Datatypes spec, which seems to suggest that
> "1" is the canonical form of "01" for integers (definitely not "1.0").
> In other places the spec says, however, that derived types inherit the
> canonical forms from the primitive type and for integer the primitive
> type is decimal, so from that one could understand "1.0" as decimal to
> be the canonical representation of integer "01".

Are you using Schema 1.1 (recommended even though not a recommendation!).

By that spec, you cannot consider "1.0" as decimal to be the canonical representation for "1" as integer. Heck, it's not the canonical representation for "1.0" as decimal!

"The definition of the ·canonical representation· has the effect of prohibiting certain options from the Lexical Mapping (§  Specifically, for integers, the decimal point and fractional part are prohibited. "

Algorithm is given in:


Which dispatches to:

And this seems to be what Oracle does (from Matthew's email):

"All the following go to xsd:decimal normalized to remove all leading and trailing 
zeros. Decimal point is not included if fractional part is zero.:"

So, "01"^^xsd:integer and "1.0"^^xsd:decimal both go to "1"^^xsd:decimal.

Received on Tuesday, 29 March 2011 17:05:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:03 UTC