W3C home > Mailing lists > Public > public-rdf-wg@w3.org > May 2011

Re: Proposal for ISSUE-12, string literals

From: Steve Harris <steve.harris@garlik.com>
Date: Fri, 13 May 2011 13:07:36 +0100
Message-Id: <6813CA4D-26F3-4803-9EC1-C956135B4F95@garlik.com>
To: "RDF-WG public-rdf-wg@w3.org" <public-rdf-wg@w3.org>
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

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Friday, 13 May 2011 12:08:05 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:42 GMT