Sebastian, you can use the Xinclude or Cinclude transformers for this purpose: you first use a pipeline that examines your content and emits either <xi:include href="cocoon:/foo"/> or <xi:include href="cocoon:/baz"/> and then apply the inclusion which will call either a foo or baz pipeline.
Cheers Con > -----Original Message----- > From: Sebastian Klamar > [mailto:[EMAIL PROTECTED] > Sent: Sunday, 11 January 2004 06:50 > To: Cocoon User Mailinglist > Subject: sitemap logic depending on pipeline content > > > Selectors do only examine the environment (request, session etc.). > I need logic in my pipeline that is depending on the pipeline content > (the current xml that flows through the pipeline). So I need a bridge > between sitemap logic (selector, matcher, action) and content logic > (transformer). AFAIK there is nothing Cocoon already offers. > > My first thought was to write a transformer myexaminer (because only > transformer have access to the pipeline content) that writes > a variable > foo to session or temporary context. The variable is evaluated by a > selector that can select the next sitemap component for > processing. It > would look like this: > > <map:transformer type="bla"/> > <!-- here the session attribute is generated --> > <map:transformer type="myexaminer"/> > <map:select type="session-attribute"> > <map:parameter name="attribute-name" value="foo"/> > <map:when test="okay"> > <map:transform type="bar"/> > <map:otherwise> > <map:transform type="bar2"/> > <map:otherwise> > <map:select> > > Problem: When is the session attribute evaluated when constructing the > pipeline? Is it done after myexaminer (no problem) or at the > beginning > of the pipeline (problem bc it is before myexaminer)? > > Uncaredly my theoretical problem, do you have another solution? > > > TIA -- Sebastian > > -- > Dinge, die man nicht h�ren will, wenn man operiert wird: > �Nun Leute, das wird ein Experiment f�r > uns alle.� > ************************************************************** > ********** > PGP Key: 0x1E727CE6 / 9085 48BD 8332 4BFC D80C A6CF D162 > 20BB 1E72 7CE6 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
