You could use the JXTemplate generator to do this without Java
programming:
<jx:macro name="iterate">
<jx:parameter name="times"/>
<jx:forEach start="1" end="${times}">
<jx:evalBody/>
</jx:forEach>
</jx:macro>
--
Chris
-----Original Message-----
From: Stephan Coboos [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 11:15 AM
To: [EMAIL PROTECTED]
Subject: Usage of SAXBuffer?
Hello,
I want to write my own transformer which iterates over a element and
repeates the content several times. For example:
<iterate times="3">
<p>I'm the content</p>
</titerate>
The content "<p>I'm the content</p>" should be repeated 3 times, like
this:
<p>I'm the content</p>
<p>I'm the content</p>
<p>I'm the content</p>
Can I use the class org.apache.cocoon.xml.SAXBuffer to do that?
Can you give me a short example, how to use this class within a
transformer?
Thank you.
Regards
Stephan