[Haskell-cafe] how to generate XHTML 1.1?

Neil Mitchell ndmitchell at gmail.com
Fri Aug 18 05:49:13 EDT 2006


Hi,

I was trying to solve this problem the other day, and the best
solution I found is haskell-source-exts:
http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/

It doesn't restrict you to XHMTL, just any valid set of XML, but
provided you actually know XHTML that shouldn't be a massive problem.
Its also quite nice, and requires less effort than other options, in
my opinion.

For example:

hello name = <html><body>Hello <% name %></body></html>

Is how you write Hello Whoever in hsx.

It also has loads of XML processing so you could write your own XHTML
1.1 validator in about 10 minutes, and run it over your stuff.

Thanks

Neil

On 8/18/06, Tamas K Papp <tpapp at princeton.edu> wrote:
> Hi,
>
> I would like to use Haskell to generate static HTML webpages,
> preferably using XHTML 1.1.  How can I do this?  I found libraries to
> generate XHTML 1.0 transitional, but not 1.1.  Scheme has LAML [1],
> which parses the DTD, uses S-expressions and validates the XHTML, I am
> looking for something similarly elegant (even if without the
> S-expressions, which I haven't seen in Haskell yet).
>
> Thanks,
>
> Tamas
>
> [1] http://www.cs.aau.dk/~normark/laml/
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list