[sc34wg3] CTM: Proposal for %mergemap directive

Jirka Kosek jirka at kosek.cz
Thu Nov 22 11:02:39 EST 2007

Robert Barta wrote:

> I am _very_ sceptical about the restriction to IRIs to address a
> stream of CTM content and also _very_ sceptical about the restriction
> to a "notation".
> Just as examples what I want to do:
>   %mergemap cat people.txt | awk '{ magic here}' |
>   # executes this pipe under UNIX and transforms it into CTM
> or
>   %mergemap "echo '...' | mysql --batch | ... |" x my-template ($2, $1, $4)
>   # executes a MySQL query and uses the my-template to generate CTM content
> I do not think that preempting the syntax of %mergemap (and/or
> %include) is the way to go....

Well, CTM should be syntax for conveying and authoring topic maps not
new scripting language which can exec shell commands.

But nothing prevents you from using custom URI schemes like:

%mergemap x-rho-exec:cat+people.txt+|+awk+'{+magic+here}'

or in the full spirit of Web architecture you can expose your
preprocessing pipe as a lightweight webservice:

%mergemap http://example.org/fetch/from/mysql?my-template($2,$1,$4)

Moreover having shell execution possibility in CTM would mean that we
have to define API for such execution, we have to deal with security
issues, ...
IMHO while such feature can be useful, it should be implemented in a
completely different layer.


  Jirka Kosek      e-mail: jirka at kosek.cz      http://xmlguru.cz
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://www.isotopicmaps.org/pipermail/sc34wg3/attachments/20071122/2637e3ac/attachment.pgp 

More information about the sc34wg3 mailing list