
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/

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
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@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Tamas K Papp 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).
Google for "Haskell SXML" to get oleg's messages: http://www.mail-archive.com/haskell@haskell.org/msg18396.html http://www.mail-archive.com/haskell@haskell.org/msg18607.html
Our running example, inspired by the Haskell.org web site, is:
test_haskell = (document (head [title "Haskell" longdash "HaskellWiki"] [meta_tag [description "All about the language" br "Haskell"]]) (body [h1 "Haskell"] [div (attr [title "titleline"]) [p [[a (attr [href (FileURL "/haskellwiki/Image:Haskelllogo.jpg")]) "Haskell" br "A <purely functional> language"]] br ] [p "Haskell is a general purpose," [[em [[strong "purely"]] "functional"]] "programming language"]]))
participants (3)
-
Chris Kuklewicz
-
Neil Mitchell
-
Tamas K Papp