You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derry O'Sullivan <de...@changingworlds.com> on 2005/10/17 17:31:17 UTC

Beginners Question

Hi all,

I'm running Cocoon 2.0.3 on Tomcat 4.1 to develop an extension to an 
existing cocoon based application. The task is to adapt existing xml 
output created by a java generator. I've looked into aggregation and 
transformations to try and get this to work. What i want to do is 
essence is change the output from:

<a>
      <b>
            <c>Old Content</c>
      </b>
</a>

to be:

<a>
       <b>
              <c>Old Content</c>
        </b>
              <d>Inserted New content</d>
</a>

by editing the source given by the generator (as in the first code 
snippet). Is it possible to do this?

many thanks in advance and sorry for the basic question,

Derry


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


Re: Beginners Question

Posted by Sylvain Wallez <sy...@apache.org>.
Derry O'Sullivan wrote:
> Hi all,
>
> I'm running Cocoon 2.0.3 on Tomcat 4.1 to develop an extension to an 
> existing cocoon based application. The task is to adapt existing xml 
> output created by a java generator. I've looked into aggregation and 
> transformations to try and get this to work. What i want to do is 
> essence is change the output from:
>
> <a>
>      <b>
>            <c>Old Content</c>
>      </b>
> </a>
>
> to be:
>
> <a>
>       <b>
>              <c>Old Content</c>
>        </b>
>              <d>Inserted New content</d>
> </a>
>
> by editing the source given by the generator (as in the first code 
> snippet). Is it possible to do this?

Yes. How you do it depends on the source of the new content. The 
simplest way is to add an XSLT transformation after the generator to 
modify its output.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


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


Re: Beginners Question

Posted by Geert Josten <Ge...@daidalos.nl>.
You can write an XSLT or STX stylesheet for that and use the corresponding transformer to apply it 
to the XML...

Cheers,
Geert

Derry O'Sullivan wrote:
> Hi all,
> 
> I'm running Cocoon 2.0.3 on Tomcat 4.1 to develop an extension to an 
> existing cocoon based application. The task is to adapt existing xml 
> output created by a java generator. I've looked into aggregation and 
> transformations to try and get this to work. What i want to do is 
> essence is change the output from:
> 
> <a>
>      <b>
>            <c>Old Content</c>
>      </b>
> </a>
> 
> to be:
> 
> <a>
>       <b>
>              <c>Old Content</c>
>        </b>
>              <d>Inserted New content</d>
> </a>
> 
> by editing the source given by the generator (as in the first code 
> snippet). Is it possible to do this?
> 
> many thanks in advance and sorry for the basic question,
> 
> Derry
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

-- 
Drs. G.P.H. Josten
Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is 
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken 
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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