Hi Upayavira,
>What do you mean by 'sends a URL'?
I mean that the client application calls cocoon by 2 different modes, it is a
constraint i can't move : The first mode send back the PDF, the second one send back a
url as text. this url is showed as a link in the client application, and cocoon send
back the PDF when this link is used. So cocoon is here used as a 'PDF file server'
too... I chose not to store PDF files (i couldn't play with the pipeline's output,
could I ?) but to store the XML generated datas as a file, and to transform it when
the link is used.
> http://wiki.cocoondev.org/Wiki.jsp?page=MetaStylesheets
> http://wiki.cocoondev.org/Wiki.jsp?page=ImplementingTransformers
Thanks a lot for your interest and these informations, it is really usefull and i will
try it now.
Regards,
Ludovic
> -----Message d'origine-----
> De: Upayavira [SMTP:[EMAIL PROTECTED]
> Date: lundi 1 septembre 2003 18:23
> �: [EMAIL PROTECTED]
> Objet: Re: Pipeline called several times for a single request ??
>
> DE BEAUREPAIRE LUDOVIC wrote:
>
> >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.
> >
> What do you mean by 'sends a URL'?
>
> > - 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).
> >
> Rather than using an action to generate your stylesheet as a file, could
> you use XSLT to generate your stylesheet? See:
>
> http://wiki.cocoondev.org/Wiki.jsp?page=MetaStylesheets
>
> >Hope it is understandable...
> >
> >
> Almost!
>
> >>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"/>
> >
> >
> Okay. So that's not it.
>
> >>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 ?
> >
> >
> See:
>
> 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,
> >>>
> >>>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: [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]
>
--
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]