- From: Bijan Parsia <bparsia@cs.man.ac.uk>
- Date: Tue, 29 Mar 2011 18:46:51 +0100
- To: Andy Seaborne <andy.seaborne@epimorphics.com>
- Cc: Birte Glimm <birte.glimm@comlab.ox.ac.uk>, Matthew Perry <matthew.perry@oracle.com>, W3C SPARQL Working Group <public-rdf-dawg@w3.org>
On 29 Mar 2011, at 18:19, Andy Seaborne wrote: > On 29/03/11 18:04, Bijan Parsia wrote: >> 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!). > > Curious - why? My and Boris's experience in the OWL WG is that the 1.1 specs are *much* superior in organization, clarity, and detail and well as nailing down various aspects. > (W3C question: as it's still a WD is it going to progress?) AFAICT, it's going to progress (checked for evidence just before emailing). [snip] >> "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. > > Oh ... a bit annoying ... That's a me artefact. The canonical lexical form obviously doesn't include the datatype. So properly, "01"^^xsd:integer has a canonical lexical form of "1". "1.0"^^xsd:decimal has a canonical lexical form of "1". (in 1.1) Of course, these are the same value, thus should have only one canonical lexical form. > http://www.w3.org/TR/xmlschema-2/#decimal-canonical-representation > > requires the decimal point. That is v. annoying! But I see why. Integer and decimal share values. Thus, having "1" for the "integer" and "1.0 for "the decimal" isn't really meeting the definition of canonicality. > As does Turtle in the short form. > > Canonicalization and setting the datatype are different. Yep, my bad. Sorry. Cheers, Bijan.
Received on Tuesday, 29 March 2011 17:47:20 UTC