You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/06/29 08:00:34 UTC

Re: Cocoon: Two generators in pipeline

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


>>> develop4free@yahoo.com 2004/06/29 06:00:33 AM >>>
Hi All, 

I am using cocoon with xsl and struts1.1

In one of the user request our webapp (<map:match
pattern="blah/**.*">)

1. Generates the xml 
2. Transform the generated xml using some xsls into image, and saves
it.
3. Now it needs the orignially generated xml(at step no. 1) inorder to
paint the html page properly.  

Since the original xml has been changed after under going  many
transformations, i tried to use generator tag again in the same match,
but it doesn't work. 

There should be a simpler way to get the original xml in the middle of
processing..pls suggest me. 





=====
- Java Developer

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


Re: Cocoon: Two generators in pipeline

Posted by Java Developer <de...@yahoo.com>.
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 <th...@juntadeandalucia.es> 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 Informacio'n S.A.U.



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



- Java Developer
		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Re: Cocoon: Two generators in pipeline

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
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 Informacio'n S.A.U.



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