Is there a way to translate a Pier document to html?
For example,
PRWikiWriter write: (PRDocumentParser parse: '!Hello World')
translates into the original Pier document. Is there something like
PRHtmlWriter that would translate the above into '<h1>Hello World</
h1>'?
r := PRViewRenderer new.
d := WAHtmlStreamDocument new.
d stream: String new writeStream.
r renderer: (WAStaticHtmlCanvas document: d).
r start: (PRDocumentParser parse: '!Hello World').
d stream contents
This only works as long as you don't have anchors and other
interactions that require a full Seaside renderer. If you need a more
sophisticated plain HTML renderer, then it is probably worth to write
your own Visitor class.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch