[sc34wg3] CTM: Specifying datatypes

Lars Heuer heuer at semagia.com
Fri Mar 27 07:51:00 EDT 2009


Hi Xuân,

> It would be nice to make this compressible to

>     somerule
>       rule("\\d+","foobar")

>     foo
>       mapping("SELECT * FROM sometable")

> However, this is not possible currently, because there is no way for the
> CTM template to set the datatype. Thus, a user would have to write
[...]

Yes, I think we should allow something like

     def mapping($t, $q)
         $t
         mapping: $q^^sql:query.
     end

We already allow

   def xy($t, $dt)
       $t
       xy: "xxx"^^$dt.
   end

c.f. <http://cxtm-tests.cvs.sourceforge.net/viewvc/cxtm-tests/cxtm-tests/ctm/in/occurrence-explicit-datatype-as-parameter.ctm?revision=1.1&view=markup>

Again, this is not in the current draft. Sorry. I'll prepare a new
draft soon after this meeting.

Best regards,
Lars
-- 
Semagia 
<http://www.semagia.com>



More information about the sc34wg3 mailing list