You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Craeg Strong <cs...@arielpartners.com> on 2006/05/22 22:14:44 UTC

Pipeline Structure To Enable Caching of static data?

Hello:

I am returning to cocoon after a long hiatus.  My, how it has grown! :-)

I would like to generate a single HTML webpage from multiple XML sources. 

No problem-- use an aggregator, right?  The issue with that is some of 
the sources change far less frequently than others.

I have data to construct the header and footer that won't change at all 
throughout the site. 

On the other end of the spectrum, I have data that is specific to a 
particular page and that changes dynamically.

I would like to cache the "per-site" data separately from the "per-major 
division" data separately from the "per-page" data.

I believe the correct way to do this is via sub-pipelines, and XInclude, 
right?

I can use a separate transformer for each layer and they will get cached 
properly, I think.  Something like:

<!-- 1) produce an HTML fragment that does not change, and can therefore 
be cached -->
<map:match pattern="siteData">
   <map:generate src="content/headerAndFooterInfo.xml/>
    <map:transform src="stylesheets/headerFooter2html.xsl"/>
   <map:serialize type="xhtml"/>
</map:match>

<!-- 2) fill in said HTML fragment with dynamic data that changes 
per-page -->
<map:match pattern="hello.html">
   <map:generate src="cocoon:/siteData"/>
   <map:transform src="stylesheets/helloPage.xsl">
      <map:parameter name="dynamic-data" value="some-uri-to-xinclude"/>
    </map:transform>
   <map:serialize type="xhtml"/>
</map>

Does the above look right?  Can anyone point me to a document or example 
code that features multi-stage/multi-part caching?
I fear I may be way off-base.  Thanks in advance!

--Craeg

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