cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david.grea...@idl-bt.com
Subject RE: Can a Transformer include multiple HTML documents?
Date Thu, 20 Dec 2001 19:12:14 GMT
I'm doing exactly this!!

Again - I'm new to cocoon so take with a pinch of caution :)

The problem with <aggregate> is that the aggregate mechanism allows the
creation of a very complex piece of XML.
The xslt must then transform the whole complex set - whenever you change the
components that are aggregated you must change the template.

I took the approach:
<map:match>
 <map:generate type="..." src="..."/>
 (I used Velocity here - it just has to output the basic XHTML template with
cincludes for the components)
 (eg: <cinclude:include src="cocoon:/menus/sidebar?area=/aboutus"/>)
 (you could certainly use #foreach to generate multiple <cinclude> tags
dynamically)
 <map:transform type="cinclude"/>
 (the cinclude now extends the XHTML template with other cocoon:/...
pipelines)
 <map:serialise/>
</map:match>

The cincluded components can read/set cookies, read the real http request
parameters and any 'private' cinclude parameters (which could be dynamically
generated).

Notice that the interim pages must be valid XHTML.

Later into the development there's a 'private' flag that stops these URLs
being seen from external HTTP reqs

Hope this helps - I have examples if required.

David



> -----Original Message-----
> From: Bertrand Delacretaz [mailto:bdelacretaz@codeconsult.ch]
> Sent: 20 December 2001 07:17
> To: cocoon-users@xml.apache.org
> Subject: Re: Can a Transformer include multiple HTML documents?
> 
> 
> On Thursday 20 December 2001 08:05, Bartomeu Adrover wrote:
> > Hello, my idea is: create "n" pipelines that acces to the 
> url's and get
> > html documents into xhtml. After that create an pipeline 
> that include all
> > this sources:
> 
> Thanks for the idea - it will work if you have a known set of 
> "HTML URLs" to 
> access, but in my case it's dynamic: the HTML URLs  are 
> computed based on the 
> initial request, and their number and form can vary.
> 
> What I'm missing is something like "dynamic sitemap 
> aggregation", but maybe 
> there is another way?
> 
> - Bertrand
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message