cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg.Konstantini...@thomson.com
Subject RE: Cocoon: Two generators in pipeline
Date Tue, 29 Jun 2004 07:01:44 GMT

You could try
http://cocoon.apache.org/2.1/userdocs/transformers/writedomsession-transform
er.html
http://cocoon.apache.org/2.1/userdocs/transformers/readdomsession-transforme
r.html


<map:act type="session"/>

<!-- save a copy of the someElement under fred -->
<map:transform type="writeDOMsession">
  <map:parameter name="dom-name" value="fred"/>
  <map:parameter name="dom-root-element" value="someElement"/>
</map:transform>

<!-- some transform that consumes someElement -->

<!-- restore someElement after someOtherElemnet -->
<map:transform type="readDOMsession">
  <map:parameter name="dom-name" value="fred"/>
  <map:parameter name="trigger-element" value="someOtherElemnet"/>
  <map:parameter name="position" value="after"/>
</map:transform>

<map:serialize type="xml"/>

<map:act type="session">
  <map:parameter name="action" value="terminate"/>
  <map:parameter name="mode" value="if-unused"/>
</map:act>


OR If the transform consumes a particular xml namespace 
you could copy it to a non consumed namespace

ie 
<wrapper>
<nm:a xmlnms:nm="1"/>
</wrapper>


<!-- do some xsl copying transform -->

<wrapper>
<nm:a xmlnms:nm="1"/>
<safenm:a xmlnms:safenm="2"/>
</wrapper>

<!-- consuming transform -->

<wrapper>
<safenm:a xmlnms:safenm="2"/>
</wrapper>

<!-- do some other xsl copying transform -->

<wrapper>
<nm:a xmlnms:nm="1"/>
</wrapper>


-----Original Message-----
From: Java Developer [mailto:develop4free@yahoo.com]
Sent: Tuesday, 29 June 2004 14:01
To: users@cocoon.apache.org
Subject: Cocoon: Two generators in pipeline 


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

Mime
View raw message