cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Klamar <sebi+lists.cocoon-us...@tux.wh17.tu-dresden.de>
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: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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message