[sc34wg3] CTM block syntax vs. TMQL embedded expressions

Lars Heuer heuer at semagia.com
Mon Jan 28 12:22:10 EST 2008


Hi all,

I wonder how nicely the proposed {}-syntax plays with TMQL-expressions
within CTM.

Here an example from the tutorial I found at
<http://kill.devc.at/system/files/language.html#id2482915>

       for $p in // person
       where
          has-composed (composer: $p, opus: $_)
       return """
              { $p }   # this copies the whole topic verbatim

              {fn:id ($p)} isa composer
       """


If I try to translate it into the new and shiny block syntax I get:


       for $p in // person
       where
          has-composed (composer: $p, opus: $_)
       return """
              { $p }   # this copies the whole topic verbatim

              {fn:id($p)} \{ isa composer; \}
       """

I think, you have to escape the CTM "{" "}" everywhere otherwise the
TMQL-processor interprets it as embedded expression. Note, that this
is a very simple example.

Maybe the TMQL-editors can verify it.

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



More information about the sc34wg3 mailing list