Thanks for your help. I have done the following but nothing changes. The value of dynamicStylesheet doesn't get to the transformer.
in generator: ------------ ... Context context = ObjectModelHelper.getContext(objectModel); context.setAttribute("dynamicStylesheet", infoitem.getTyp().getStylesheet()); ... in sitemap: ----------- <map:match pattern="**item_*-view_*"> <map:generate type="itemdata"> <map:parameter name="item-id" value="{2}"/> <map:parameter name="view" value="{3}"/> </map:generate> <map:transform src="transform/dynamic/{dynamicStylesheet}.xsl"/> <map:serialize type="xml"/> </map:match> What could I have done wrong. I could'nt find anything in the cocoon docs.. Robert ----- Original Message ----- From: "Nicola Ken Barozzi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 9:54 AM Subject: Re: set transformer source from generator > > > 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 [EMAIL PROTECTED] > - 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>