Re: Proposal for ISSUE-12, string literals

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 .


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 13:47:25 UTC