cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DE BEAUREPAIRE LUDOVIC" <LUDOVIC.DE-BEAUREPA...@infolis.fr>
Subject RE: Pipeline called several times for a single request ??
Date Mon, 01 Sep 2003 12:16:20 GMT
Here is my need,

I have to generate PDF files. The request sends me a part of the xml datas and the name of
the stylesheet. 2 other constraints (can't be moved) :
 - a request parameter defines if cocoon sends the generated PDF, or if it sends the URL for
an utilisation in the future.
 - a request can send datas for X concatenated PFD editions in one file (X different XML datas
and X different stylesheet)

At the beginning, I defined my differents stylesheets (now more than 200) as XSL templates,
and one common stylesheet imports all of these and allows production of X concatenated editions.
The generation (action + xsp) produces either aggregated XML datas for the XSL transformation,
or register these datas in a file and produces the URL for the future transformation. It was
a correct solution until now during 6 months, but the number of stylesheet increased and caused
memory problems (what is more i encoutered a memory leak using the JDK1.3 version so passed
on 1.4).

So how to do ?
A solution to prevent cocoon from storing all the templates in memory, an issue (?) was to
create for each request a small xsl file importing the templates used for this edition. If
I don't need to send back the generated PDF it is ok, but i have a problem if i need to. If
I use the new XSL file i have several requests on my pipeline, and if i use redirection to
avoid it and an error happens sometime (1/10).

Hope it is understandable...

> For one thing, it will confuse the caching system, as it takes note of 
> the timestamp on all XSL files. That could be causing your problems. The 
> question is: what are you trying to achieve, and is there another way of 
> doing it?

i try without the caching system and i have the same results : 
    <stream-pipeline class="org.apache.cocoon.components.pipeline.NonCachingStreamPipeline"/>
    <event-pipeline class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>

> You might be better off coding this directly in Java as a custom 
> transformer if the task is that complex.

I have never used it. Can you say more, a usefull link ?

Thanks for any help,

Ludovic
 



> -----Message d'origine-----
> De:	Upayavira [SMTP:uv@upaya.co.uk]
> Date:	lundi 1 septembre 2003 12:37
> À:	users@cocoon.apache.org
> Objet:	Re: Pipeline called several times for a single request  ??
> 
> DE BEAUREPAIRE LUDOVIC wrote:
> 
> >Hi all,
> >
> >Can someone help me to understand this strange behaviour :
> >
> >I have a quite simple sitemap : The "test" action defines xml and xsl files used
to produce PDF files.
> >   <map:match pattern="edit">
> >    <map:act type="test">
> >         <map:generate src="work/xml/{donnees}.xml"/>
> >         <map:transform src="work/xsl/{feuille}.xsl"/>
> >         <map:serialize type="fo2pdf"/>
> >    </map:act>
> >   </map:match>
> >
> >The problem is when the action CREATE the xsl file, then the action is called another
time by cocoon with nothing in the request, so i have errors.
> >Is it a known behavior ? is there a known solution ?
> >  
> >
> Why do you want an action to create an XSL? Somehow I feel uncomfortable 
> with that as an approach.
> 
> For one thing, it will confuse the caching system, as it takes note of 
> the timestamp on all XSL files. That could be causing your problems. The 
> question is: what are you trying to achieve, and is there another way of 
> doing it?
> 
> >2 others solution i tried :
> >- Having xsl as templates in one stylesheet (no creation), but it is using too much
memory (more than 200 stylesheets)
> >
> Can you explain more?
> 
> >- using redirection for transformation operation but i have an erratic comportment
(1*/10, the URL has moved ???)
> >
> You might be better off coding this directly in Java as a custom 
> transformer if the task is that complex.
> 
> Regards, Upayavira
> 
> 
> 
> ---------------------------------------------------------------------> 
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

--
Ce message et  toutes les pieces jointes (ci-apres  le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute  utilisation ou  diffusion  non autorisee  est interdite.   Tout
message  etant  susceptible  d'alteration,  l'emetteur  decline  toute
responsabilite au titre de  ce message  s'il a  ete altere, deforme ou
falsifie.
                -----------------------------------
This message and any  attachments (the "message") are confidential and
intended  solely   for  the   addressees.  Any  unauthorised   use  or
dissemination is prohibited. As e-mails are susceptible to alteration,
the issuer shall  not be  liable for  the  message if altered, changed
or falsified.

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


Mime
View raw message