You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by zach rappaport <za...@hotmail.com> on 2002/07/22 20:20:02 UTC

newbie: aggregation question

Hello -

I am using Cocoon version: 2.0.2 and Tomcat version: 4.0.4, and am very very 
new to Cocoon.

I have a currently working xml -> xsl stylesheet -> html module developed to 
publish various reports. I would like to move
my existing setup over to Cocoon. In my current setup, the xml data is 
passed to 1 xsl stylesheet and transformed to hmtl output. This 1 xsl 
stylesheet (the main xsl stylesheet) calls a few other xsl stylesheets 
within (via: <xsl:call-template />). How do I mimic this behavior in Cocoon? 
Am I to use aggregation? If so, what are my <map: parts />?

Once again, the current setup is like this:

xml -> main xsl stylesheet -> html

main xsl stylesheet (main.xsl) calls (header.xsl, body.xsl, footer.xsl).

Can I aggregate the html output proffered by the various xsl stylesheets by 
<map:aggregate> and <map: part>?

Thank you.



_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

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


Re: newbie: aggregation question

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Tue, Jul 23, 2002 at 09:23:47AM +0200, Luca Morandini wrote:
> Leszek,
> 
> I presume this issue can't be solved like you suggested.
> 
> Including a stylesheets (which is what Zach wants) is just a mean for separating source code into different files, but the
> transformation is happening at the same time.
> What you suggested is a serial bunch of transformations, which is quite different.
I think I did not got the point. Sorry for messing up
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


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

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


RE: newbie: aggregation question

Posted by Luca Morandini <lu...@tin.it>.
Leszek,

I presume this issue can't be solved like you suggested.

Including a stylesheets (which is what Zach wants) is just a mean for separating source code into different files, but the
transformation is happening at the same time.
What you suggested is a serial bunch of transformations, which is quite different.

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Leszek Gawron [mailto:ouzo@kompuart.pl]
> Sent: Tuesday, July 23, 2002 9:16 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: newbie: aggregation question
>
>
> On Mon, Jul 22, 2002 at 06:20:02PM +0000, zach rappaport wrote:
> > Hello -
> >
> > I am using Cocoon version: 2.0.2 and Tomcat version: 4.0.4, and am very
> > very new to Cocoon.
> >
> > I have a currently working xml -> xsl stylesheet -> html module developed
> > to publish various reports. I would like to move
> > my existing setup over to Cocoon. In my current setup, the xml data is
> > passed to 1 xsl stylesheet and transformed to hmtl output. This 1 xsl
> > stylesheet (the main xsl stylesheet) calls a few other xsl stylesheets
> > within (via: <xsl:call-template />). How do I mimic this behavior in
> > Cocoon? Am I to use aggregation? If so, what are my <map: parts />?
> >
> > Once again, the current setup is like this:
> >
> > xml -> main xsl stylesheet -> html
> >
> > main xsl stylesheet (main.xsl) calls (header.xsl, body.xsl, footer.xsl).
> >
> > Can I aggregate the html output proffered by the various xsl stylesheets by
> > <map:aggregate> and <map: part>?
> You do not need aggregation for this
> the only thing you do is:
>
> <map:match pattern="page.html>
> 	<map:generate src="yourxml.xml"/>
> 	<map:transform src="header.xsl"/>
> 	<map:transform src="body.xsl"/>
> 	<map:transform src="footer.xsl"/>
> 	<map:transform src="main.xsl"/>
> 	<map:serialize/>
> </map:match>
>
> you do not have to reference other stylesheets in main.xsl
> 	ouzo
> --
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/      ouzo@vip.net.pl          _\\()//_
>          .'/()\'.     Phone: +48(600)341118     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


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

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


Re: newbie: aggregation question

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Mon, Jul 22, 2002 at 06:20:02PM +0000, zach rappaport wrote:
> Hello -
> 
> I am using Cocoon version: 2.0.2 and Tomcat version: 4.0.4, and am very 
> very new to Cocoon.
> 
> I have a currently working xml -> xsl stylesheet -> html module developed 
> to publish various reports. I would like to move
> my existing setup over to Cocoon. In my current setup, the xml data is 
> passed to 1 xsl stylesheet and transformed to hmtl output. This 1 xsl 
> stylesheet (the main xsl stylesheet) calls a few other xsl stylesheets 
> within (via: <xsl:call-template />). How do I mimic this behavior in 
> Cocoon? Am I to use aggregation? If so, what are my <map: parts />?
> 
> Once again, the current setup is like this:
> 
> xml -> main xsl stylesheet -> html
> 
> main xsl stylesheet (main.xsl) calls (header.xsl, body.xsl, footer.xsl).
> 
> Can I aggregate the html output proffered by the various xsl stylesheets by 
> <map:aggregate> and <map: part>?
You do not need aggregation for this
the only thing you do is: 

<map:match pattern="page.html>
	<map:generate src="yourxml.xml"/>
	<map:transform src="header.xsl"/>
	<map:transform src="body.xsl"/>
	<map:transform src="footer.xsl"/>
	<map:transform src="main.xsl"/>
	<map:serialize/>
</map:match>

you do not have to reference other stylesheets in main.xsl
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


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

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