Re: Proposal for ISSUE-12, string literals

On 13 May 2011, at 14:46, Antoine Zimmermann wrote:
> xsd:double is disjoint from xsd:decimal, so there is no risk that doubles get canonicalised into decimals.
> 
> "1"^^xsd:double owl:differentFrom "1"^^xsd:decimal .

Oh, I wasn't aware of that.

In that case, I withdraw the idea of automatically converting between numeric datatypes. It doesn't feel like a simplification to me if some of them are converted (e.g., byte => decimal) and others not (e.g., double =/=> decimal). This would just make matters more confusing.

I'd still like to do something like this:

“For all XSD datatypes that define canonical lexical forms [XML-SCHEMA2], implementations MAY replace a non-canonical lexical form (such as "+0013"^^xsd:integer) with a canonical lexical form ("13"^^xsd:integer).”

I noted some concerns about this:

Objection 1: Can no longer use 2.0000 to denote precision

Response: Don't do that. That's not how numbers work in any programming language, database, or spreadsheet I've ever used.

Objection 2: time and dateTime would become always UTC

I'm not sure what to respond here.

Objection 3: Canonical lexical form of "2e+138"^^xsd:decimal is unwieldy

Response: It's a wash. The canonical lexical representation of "2e-0"^^xsd:decimal is quite nice, for example.

Best,
Richard



> 
> 
> See http://www.w3.org/TR/xmlschema-2/#equal:
> 
> "the ·value space·s of all ·primitive· datatypes are disjoint (they do not share any values)"
> 
> and http://www.w3.org/TR/xmlschema-2/#built-in-primitive-datatypes
> 
> 
> Le 13/05/2011 14:07, Steve Harris a écrit :
>> On 2011-05-12, at 14:27, Richard Cyganiak wrote:
>> 
>>> On 12 May 2011, at 13:06, Ivan Herman wrote:
>>>>> I'd be tempted to go further and make only the primitive types such as xsd:decimal into RDF canonical forms. This would mean that systems MAY canonicalize all numbers to a single numeric datatype.
>>>> 
>>>> Do you mean like the 'canonical' forms in Turtle? I may miss something here.
>>> 
>>> No. Turtle has syntactic sugar for certain numeric literals; this has nothing to do with canonicalization.
>>> 
>>> (This all goes way beyond ISSUE-12 anyways...)
>>> 
>>> I was suggesting that perhaps, instead of this:
>>> "+0013"^^xsd:byte =>  "13"^^xsd:byte
>>> 
>>> I'd like to say that implementations MAY do this:
>>> "+0013"^^xsd:byte =>  "13.0"^^xsd:decimal
>> 
>> Hesitant -1 to, there are numbers that xsd:double for e.g. can represent, that xsd:decimal doesn't promise to. Also the canonical form of 1.79e+308 as an xsd:decimal is quite an unwieldy string.
>> 
>> There are also situations when you might care about things being integers, e.g. ordinals.
>> 
>> - Steve
>> 
> 
> 
> -- 
> Antoine Zimmermann
> Researcher at:
> Laboratoire d'InfoRmatique en Image et Systèmes d'information
> Database Group
> 7 Avenue Jean Capelle
> 69621 Villeurbanne Cedex
> France
> Tel: +33(0)4 72 43 61 74 - Fax: +33(0)4 72 43 87 13
> Lecturer at:
> Institut National des Sciences Appliquées de Lyon
> 20 Avenue Albert Einstein
> 69621 Villeurbanne Cedex
> France
> antoine.zimmermann@insa-lyon.fr
> http://zimmer.aprilfoolsreview.com/
> 

Received on Friday, 13 May 2011 15:00:53 UTC