cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Oliver" <coli...@SeeBeyond.com>
Subject RE: Usage of SAXBuffer?
Date Fri, 05 Mar 2004 19:35:24 GMT
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:cromosom@gmx.net] 
Sent: Friday, March 05, 2004 11:15 AM
To: dev@cocoon.apache.org
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

Mime
View raw message