cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <>
Subject [C2] Allowing actions to select transformer type
Date Mon, 30 Apr 2001 09:22:48 GMT

I would like to be able to let the action that runs before the pipeline is
executed to select the type of transformer to be used:

   <map:match pattern="testpage.html">
    <map:act type="action">
     <map:generate type="testgenerator"/>
     <map:transform type="{transformer}" src="{stylesheet}"/>
     <map:serialize type="html"/>

Currently, substitution is only done for the src attribute of
<map:transform/>, and not for the type attribute, which causes Cocoon to
crash, as the transformer selector can't find a suitable transformer for the
hint "{transformer}".

I'm sure the same effect can be achieved via a selector that tests on
sitemap parameters, however: Since the substitution model is used for the
sitemap parameters set by actions everywhere else, it would be more
consistent to substitute the type attribute as well.

I'd like to hear some opinions about this before submitting a patch for
review. (Most of all, it would be nice to hear that this is already possible
in a much easier way than I know of. :-))

The possible patches I see are:

0) No patch, this is already possible.
1) Change lines 1197, 1213, 1218 of
emap.xsl. This is the way I'd like to do it.
2) Create a new selector that tests on sitemap parameters.


To unsubscribe, e-mail:
For additional commands, email:

View raw message