cocoon-users mailing list archives

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

You could try

<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"/>

<!-- 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:serialize type="xml"/>

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

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

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

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

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

<!-- consuming transform -->

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

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

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

-----Original Message-----
From: Java Developer []
Sent: Tuesday, 29 June 2004 14:01
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
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 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message