cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giuseppe Di Pierri <p...@arpage.ch>
Subject Re: Aggregating parts to a site page concept
Date Mon, 25 Feb 2002 11:25:07 GMT
Hi Raul,

this is an example I did (in the sitemap) in one of my projects:

	<map:match pattern="edit(*).html">
		<map:aggregate element="document">
			<map:part src="docs/editHeader.xml" element=""/>
			<map:part src="cocoon:/menu({1}).xml"
element="menu"/>
			<map:part src="cocoon:/preview({1}).xml"
element="body"/>
		</map:aggregate>
		<map:redirect-to resource="show" target="{1}"/>
	</map:match>

	<map:match pattern="preview(*).xml">
		<map:generate src="cocoon:/content({1}).xml"/>
    <map:transform src="stylesheets/transformers/content2document.xsl"/>
		<map:serialize type="xml"/>
	</map:match>	
	
	<map:match pattern="menu(*).xml">
		<map:generate src="cocoon:/content({1}).xml"/>
		<map:transform
src="stylesheets/transformers/content2menu.xsl"/>
		<map:serialize type="xml"/>
	</map:match>

	<map:match pattern="content(*).xml">
		<map:generate type="serverpages" src="docs/{1}.xsp"/>
		<map:serialize type="xml"/>
	</map:match>


content gets the data from a Database.
Priview shows it on a web page.
Menu prepare the menu items I need to manage the preview.
Heather is fix (but could be handle more dinamically)
Edit merge the everything.
And resource "show" transform into xhtml.

Hope this example can help you.

Regards,


pino

On Fri, 22 Feb 2002, Fiedler, Raul wrote:

> Hello
> 
> reading in the archived mails
> From: Ling Kok Choon 
> Subject: Sitemap and Action 
> Date: Mon, 13 Aug 2001 23:35:45 -0700 
> http://www.mail-archive.com/cocoon-users@xml.apache.org/msg02724.html
> 
> The mails is a presentation of a way to puzzle together dynamic content with
> 
> dynamic side menus and so fort and is very interesting.
> 
> Could someone explain what really goes on in a more simple example:
> Site map have following components
> 
> Generator for dynamic generation of content
> Static side menu
> Aggregating page
> ----------------------------------------------------------------------------
> --------------------
> <map:pipeline>
>  <map:match pattern="content">
>   <map:generate type="my-content-generator"/>
>   <map:transform src="stylesheets/content.xsl"/>
>   <map:serialize type="html"/>
>  </map:match>
> </map:pipeline> 
> 
> <map:pipeline>
>  <map:match pattern="menu">
>   <map:generate src="docs/menu.xml"/>
>   <map:transform src="stylesheets/menu.xsl"/>
>   <map:serialize type="html"/>
>  </map:match>
> </map:pipeline>
> 
> <map:pipeline>
>  <map:match pattern="site">
>   <map:aggregate element="page:>
>    <map:part src="menu"/>
>    <map:part src="content"/>
>   </map:aggregate>
>   <map:transform src="stylesheets/site.xsl"/>
>   <map:serialize type="html"/>
>  </map:match>
> </map:pipeline>
> 
> ----------------------------------------------------------------------------
> ---------
> Questions:
> 1. Is the map:part really calling other pipelines in the site map?
> 2. Is XML or HTML aggregated
> 3. The Content Generator takes HTTP parameters example content?id=3 how will
> parameters be propagated in the pipelines?
> 4. Will this concept work?
> 
> Thank you very much
> 
> 
> > Raul Fiedler
> > European Central Bank
> > DG Information Systems - Business Development
> > *   +49 (0) 69 1344 6870 
> > * raul.fiedler@ecb.int
> > 
> 
> Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall
neither be binding nor construed as constituting a commitment by the ECB except where provided
for in a written agreement.
> This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised
disclosure, use or dissemination, either in whole or in part, is prohibited.
> If you have received this e-mail in error, please notify the sender immediately via e-mail
and delete this e-mail from your system.
> 
> 
> ---------------------------------------------------------------------
> 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