From xml to html - with a bit of context

Torben Hoffmann torben.lehoff@REDACTED
Thu Jan 21 00:00:29 CET 2010


If my need simply was to transform some xml to html I think the xmerl suite
would suffice, but there are some extra things that might affect the choice
of tool for this job.

First off, the solution has to be shippable as pure Erlang to the end user
which should be able to run the application on his own machine - i.e., no
server to hide non-Erlang things. (Trying to stay off platform specific

Now the full context: I am working on a Wiki using WikiCreole as the markup
language. So the job is to do a WikiCreole -> html transformation and
allowing for some dynamic data in the process.

My first attempt was to do WikiCreole -> ehtml and run it through yaws, but
I would like to avoid shipping yaws with my product.

Furthermore, I would like to be able to tailor my final output to not only
different variants of html depending on what the browser application is
capable of showing, but also allow for something else than html in the

So I would like to implement this chain:
WikiCreole -> AST (abstract syntax tree) -> <some target markup language>

My AST is not fixed (yet) so I can alter it to make the job easier. Right
now I am thinking that an AST that uses the xmerl internal data structure is
an okay choice since I could use some XSLT transformation on that and get a
variety of outputs by using different transformations.

So my chain becomes:
WikeCreole -> AST(xmerl) + XSLT -> <some target markup language, initially

So my question to the guru is if this is the right approach of if there is
something smarter out there that meets my needs?

Let me know if you need more details to answer my question.

Thanks in advance,

More information about the erlang-questions mailing list