cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Klamar <>
Subject sitemap logic depending on pipeline content
Date Sat, 10 Jan 2004 17:49:44 GMT
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:transform type="bar2"/>

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:
For additional commands, e-mail:

View raw message