cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: set transformer source from generator
Date Mon, 27 Jan 2003 08:54:27 GMT

Robert Sösemann wrote:
> Dear listmembers,
> maybe its answer is easy but I couldn't find an answer in the archieves.
> I need to dynamically set the transformer source based on a parameter set
> inside the Generator.
> Thats what my matcher should look like:
> ----------------------------------------
> <map:match="articleid_*">
>     <map:generate type="stylesheetassigner"/>
>     <map:transformer src="{paramFromGenerator}"/>
>     <map:serialize type="html"/>
> </map:match>
> For some reasons I can't use a second generator calling this matcher as
> CInclude. So, is there another solution to this?
> Maybe you know and can help me.

Make the Generator add a the "paramFromGenerator" variable to the Context.

But I'm seeing type "stylesheetassigner"... maybe this could be done 
better with an action:

      <map:generate type="file"/>
      <map:action type="stylesheetassigner"/>
        <map:transformer src="{paramFromAction}"/>
      <map:serialize type="html"/>

Take a look in the CVS in the src/scratchpad dir 
to find the sourceType classes.

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message