cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: [Fwd: [Chaperon-users] wiki grammer]
Date Thu, 25 Aug 2005 15:12:00 GMT
Le 25 août 05, à 16:45, Oliver Schalch a écrit :
> ...Looks quite nice, didnt know it. Of course I'd like to see some code
> samples, which you made..

Basically what we do is:

String input = "wiki text..";

// Radeox generates xhtml in a String (unfortunately)
RenderContext context = ...some radeox RenderContext
RenderEngine engine = ...standard or custom RenderEngine
final String xhtml = engine.render(input, context);

/ parse the XHTML
DOMConverter cvt = (DOMConverter)m_manager.lookup(DOMConverter.ROLE);
Document result = cvt.stringToDOM(xhtml);

Thinking about it, using nekoHTML (from the html block) to parse and 
cleanup the result might be easier.

-Bertrand


Mime
View raw message