cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Airey <>
Subject cinclude problem in "shared" pipelines
Date Thu, 06 Jun 2002 12:26:48 GMT
Hello everyone, 

I have a problem with the way I am using the cinclude transformer, as

I have 2 pages, A and B, each on a pipeline. Each page is a simple xml
file, then the cinclude transformer, then an xslt and a serializer to

Here is the input xml for page A:

<?xml version="1.0"?>
<page xmlns:cinclude="" type="A">
  <cinclude:include src="cocoon:/roles"/>
  <cinclude:include src="cocoon:/user"/>
  <cinclude:include src="cocoon:/cart"/>

Page B is very similar. You can see that 3 pipelines are called and
included together. 

The "cart" pipeline (representing a shopping cart) itself consists of a
file similar to the above

<?xml version="1.0"?>
<page xmlns:cinclude="">
  <cinclude:include src="cocoon:/categories"/>
  <cinclude:include src="cocoon:/multiservices"/>
  <cinclude:include src="cocoon:/rawcart"/>

The included "rawcart" pipeline is a custom generator which holds the
user's shopping cart selections. The "cart" pipeline gets these three
pieces, includes them and then does an xsl transformation, before
serialising to xml.

Here is the problem:

Suppose page A is being displayed (its a select-your-order page). The
user POSTs some cart updates and is redirected to page B (eg a
confirm-your-order page). Page B is rendered correctly, because when the
"rawcart" generator is accessed, it indicates that it is out of date,
and so its generate() method runs. Everything is fine for page B. Page A
is not rendered, as the user has changed pages.

Now lets assume that the user wants to go back to page A (ie. to change
the order). Now the "rawcart" pipeline correctly indicates that its data
has not changed since the last generate(). Nothing else has changed, so
the "cart" pipeline says it also doesn't need regeneration. So
eventually, the previously cached pipeline for page A is displayed -
which is out of date - showing the page as it was before the user
selected "page B".

One way around this is always to regenerate "rawcart", but this seems
like an unsatisfactory solution, as the extra xslt (part of the "cart"
pipeline) has to run when it's not really required. 

Obviously the core of the problem is that two pipelines are sharing a
third one. 

Any suggestions to get around this?

Kind regards,

To unsubscribe, e-mail:
For additional commands, email:

View raw message