Here is my need,What do you mean by 'sends a URL'?
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)Rather than using an action to generate your stylesheet as a file, could you use XSLT to generate your stylesheet? See:
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).
http://wiki.cocoondev.org/Wiki.jsp?page=MetaStylesheets
Hope it is understandable...Almost!
Okay. So that's not it.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"/>
See: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 ?
http://wiki.cocoondev.org/Wiki.jsp?page=ImplementingTransformers
Hope this helps!
Regards, Upayavira
-----Message d'origine----- De: Upayavira [SMTP:[EMAIL PROTECTED] Date: lundi 1 septembre 2003 12:37 �: [EMAIL PROTECTED] Objet: Re: Pipeline called several times for a single request ??
DE BEAUREPAIRE LUDOVIC wrote:
Hi all,Why do you want an action to create an XSL? Somehow I feel uncomfortable with that as an approach.
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 ?
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?
Can you explain more?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)
- 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
