[sc34wg3] CTM: Specifying datatypes

Lars Heuer heuer at semagia.com
Mon Mar 30 14:27:15 EDT 2009

Hi Xuân,

It would be very nice if you take a minute to read
<http://learn.to/quote> (and follow these rules of course). TIA.

>> Requiring that the string which was provided by the user is kept,
>> would be wrong imo.
> Well, why?

> We can make it very simple:

>     An attempt to set the datatype only succeeds either if the old
>     datatype is xsd:string or if the old datatype equals the new
>     datatype, otherwise such an attempt is an error.

Yes, actually I thought about limiting the datatype to xsd:string
until Lars Marius brought up his examples. :) We could limit the
'input' datatype to xsd:string, of course, but I thought it would be
neither fish nor fowl, just one more special case.

> The purpose of overriding datatypes is to make it possible to write
> typed strings as template-arguments without providing the type
> information over and over again.

Yep, but I think limiting the stuff to xsd:string and creating a
special case would be wrong (maybe rho influenced me more than I
thought ;)). What's special about strings? Because everything has a
string representation? If everything has a string representation, why
shouldn't we allow the examples Lars Marius has brought up? All XML
Schema datatypes have at least one string representation. And if we
limit the datatype to xsd:string, what about our escaping rules, do we
need an additional "raw" string literal or do we assume that the other
datatype can happily use our de-escaped strings?

Best regards,

More information about the sc34wg3 mailing list