cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
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:match="articleid_*">
      <map:generate type="file"/>
      <map:action type="stylesheetassigner"/>
        <map:transformer src="{paramFromAction}"/>
      </map:action>
      <map:serialize type="html"/>
  </map:match>

Take a look in the xml.apache.org/forrest CVS in the src/scratchpad dir 
to find the sourceType classes.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - 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.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message