Derek Hohls wrote:
Thorsten
For future reference, you could refine it a little further:
:).
Cheers, dude, but me not having that question ;-). It was [EMAIL PROTECTED] making the suggestion.
But once again I agree to cache the myknown.xml makes the overall performance better! It is always a good to cache the result of a often used generator result.
King regards thorsten
<map:match pattern="out/*.xml"> <map: generate src="cocoon:/save_image"/> <map:transform src="cocoon:/get_xml_back"/> <map:transform src="{1}.xsl"> <map:serialize/> </map:match>
<map:match pattern="save_image">
<!-- call generated XML -->
<map:generate src="cocoon:/get_xml_back"/> <map:transform/> // and save image in the file system
<map:serialize type="xml"/>
</map:match>
<map:match pattern="get_xml_back"> <map:generate src="myknown.xml"/> <map:serialize type="xml"/> </map:match>
This way the "myknown.xml" is only generated once; important if, say, you are building this source from a database or having to call some other external (slow) resource.
Cheers Derek
[EMAIL PROTECTED] 2004/06/30 07:11:43 AM >>>
Thanks you all, your inputs and suggestions helped me in fixing my problem.
Just as an update, I created three matches in one pipeline, :
<map:match pattern="out/*.xml"> <map: generator src="cocoon:/save_image"/>
<map:transform src="cocoon:/get_xml_back"/>
<map:transform src="{1}.xsl"> <map:serialize/> </map:match> <map:match pattern="save_image"> <map:generate src="myknown.xml"/> <map:transform/> // and save image in the file system <map:serialize type="xml"/> </map:match>
<map:match pattern="get_xml_back"> <map:generate src="myknown.xml"/> <map:serialize type="xml"/> </map:match>
One concept that i was missing was each match has to end with a serializer and start with an generator.
Thanks much.
Thorsten Scherler <[EMAIL PROTECTED]> wrote: Derek Hohls wrote:
One way would be to use *4* pipelines; 1. one that generates the original XML (and serializes it as XML) 2. one that creates your image - based on a cocoon:/ call to Pipe 1 3. one that creates your base HTML - based on a cocoon:/ call to Pipe 1 4. one that aggregates the results of pipes 2 and 3.
Pipe 1 should be cached, so even though you call it twice, it should only have to do the work once...
HTH Derek
+1
It is the cleanest solution!
thorsten
-- Thorsten Scherler
Departamento de Desarrollo de Proyectos Sociedad Andaluza para el Desarrollo de la Sociedad de la Informaci�n S.A.U. Avda. de la Arboleda s/n 41940 - Tomares, (Sevilla) Tlfn: (+34) 955 062 627 e-mail: [EMAIL PROTECTED]
Este correo electr�nico y, en su caso, cualquier fichero anexo al mismo, contiene informaci�n de car�cter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgaci�n, copia o distribuci�n a terceros sin la previa autorizaci�n escrita de "Sociedad Andaluza para el Desarrollo de la Sociedad de la Informaci�n, S.A.U.". Si no es Ud. el destinatario del mensaje le ruego lo destruya sin hacer copia digital o f�sica, comunicando a Sociedad Andaluza para el Desarrollo de la Sociedad de la Informaci�n S.A.U. v�a e-mail o fax la recepci�n del presente mensaje. Toda declaraci�n de voluntad contenida deber� ser tenida por no producida. Gracias. ____________________________________________________________________________ ___________________
The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of "Sociedad Andaluza para el Desarrollo de la Sociedad de la Informaci�n, S.A.U.". If you are not the formal receiver of this message please destroy it without making any digital or physical copy and inform "Sociedad Andaluza para el Desarrollo de la Sociedad de la Informaci�n S.A.U." , by e-mail or fax, of the reception of the present message. Any whatsoever involuntary declaration contained herewith must be taken as having no legal effect. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
