Re: Proposal for ISSUE-12, string literals

Le 12/05/2011 23:32, Andy Seaborne a écrit :
>
>
> On 12/05/11 21:07, Pat Hayes wrote:
>>
>> On May 12, 2011, at 10:49 AM, Ivan Herman wrote:
>>
>>>
>>> On May 12, 2011, at 15: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
>>>>
>>>
>>> I have not made up my mind on this, just thinking out 'loud': in many
>>> programming environment I would like to have access to the fact that
>>> something is a byte and not a decimal because the implementation of
>>> the latter might be way more complex and slow than the former. In
>>> other words, I am not sure RDF should be too 'smart' about it.
>>
>> +1
>>
>> Pat
>
> Does this case matter to anyone?
>
> :p rdfs:range xsd:postiveInteger .
>
> might create the expectation that the value of :p has a
> ^^xsd:postiveInteger but substitution with xsd:decimal breaks that
> expectation.

If I write this explicitely in the data:

:s :p "1"^^xsd:decimal .

how is your expectation helping? In any case, you need to deal with 
literals with type xsd:decimal so why not simply replacing all numerical 
literals having the same values by their canonical form in the 
corresponding primitive type?

With that said and with what Ivan said, it is likely that types like 
"xsd:byte" may help implementations optimise some processes so I am not 
too sure what is best.
-- 
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 14:18:05 UTC