cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Pipe-aware Selectors
Date Wed, 06 Mar 2002 12:04:16 GMT
Michael Homeijer wrote:
> 
> Hi Stefano,
> 
> Could you please have another look at the solution described by Bruno Dumon
> in the mailing list and comment on it.
> I'd really like to know what you think about it.
> 
> It seperates the small incoming parts of data from the outgoing flow,
> doesn't change any cocoon interfaces, and you will be able to integrate
> results from processing incoming data into the pipeline again.

Bruno wrote this example:

<map:act type="FetchAndStoreXml" src="cocoon:/something">
  <map:parameter name="storeAs" value="foo">
</map:act>
<map:select type="XPathSelector"
  <map:parameter name="xmlName" value="foo">
  <map:when test="/some/node = 'xyz'">
    <map:redirect-to uri="somewhere">
  </map:when>
  <map:otherwise>
    <map:generate type="XSLTGenerator" src="stylesheetsource">
      <map:parameter name="xmlName" value="foo">
    </map:generate>
    <map:serialize/>
  </map:otherwise>
</map:select>

I have the feeling that this is a (admittedly brilliant!) hack.

If we believe that Selectors should have access to the pipe flow, we
must change the interfaces, not create hacks with what is already
there... otherwise the system will be torn apart by these hacks (the
maintenance cost of the above code is huge since it's hard to understand
what it does simply by looking at it!)

This is my perception.

What do others think about this?

C'mon, without input I won't change anything.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message