[sc34wg3] Fwd: Re: CTM: Specifying datatypes
heuer at semagia.com
Mon Mar 30 13:31:51 EDT 2009
First attempt to send the msg seems to have failed.
This is a forwarded message
From: Lars Heuer <heuer at semagia.com>
To: Discussion of ISO/IEC 13250 Topic Maps <sc34wg3 at isotopicmaps.org>
Date: Monday, March 30, 2009 6:54:02 PM
Subject: [sc34wg3] CTM: Specifying datatypes
===8<==============Original message text===============
>> Yes, I think we should allow something like
>> def mapping($t, $q)
>> mapping: $q^^sql:query.
> What happens if I then use the template as follows?
> mapping(foo, "select ..."^^xsd:string).
> mapping(foo, "select ..."^^bar:sql-query).
> mapping(foo, 1).
Well, after I've written the enthusiastic "Yes, we should", I wondered
if this is a good idea. The problem is, that the TMDM provides only
limited support for literal values != xsd:anyURI and xsd:string. If
the result should be (according to TMDM which forbids normalization of
but a more sophisticated Topic Maps engine may produce:
since the value of "1.0000" can be translated to "1.0" (canonical form
of the xsd:decimal value).
So, we need a policy how to translate a value from one datatype to
another. The canonical representation would be an option but since it
is not mentioned in the TMDM, I wonder if this policy is doable.
Requiring that the string which was provided by the user is kept,
would be wrong imo.
I tend to join Graham's fan club and leave CTM as it is (regarding
this issue) just to avoid the ugliness of translating literals from
one datatype to another.
===8<===========End of original message text===========
More information about the sc34wg3