[Haskell-cafe] Re: Xhtml?
noteed at gmail.com
Wed Jan 13 09:56:30 EST 2010
2010/1/13 Günther Schmidt <gue.schmidt at web.de>:
> Am 13.01.10 15:31, schrieb Günther Schmidt:
>> apologies upfront. As time presses I decided to post questions
>> immediately as soon as I run into dead-ends.
>> I just don't want to give the impression that I'm not willing to do my
>> I'm trying to find documentation on Xhtml, the site on hackage refers to
>> http://www.cse.ogi.edu/~andy/html/intro.htm for an introduction to the
>> library, the link is dead.
>> I managed to locate Andy Gill's current homepage
>> (http://www.cse.ogi.edu/~andy/html/intro.htm) but there is no mention of
>> his html combinatory library.
> sry, I meant this site here: http://www.ittc.ku.edu/~andygill/index.php
>> Does anyone else know where an introduction to this library can be
>> retrieved from?
By Xhtml, do you mean the xhtml package on hackage  ?
Maybe to get you started:
Prelude> :m + Text.XHtml.Strict
Prelude Text.XHtml.Strict> putStrLn . prettyHtmlFragment $ p (primHtml
"hello") ! [theclass "foo"]
The idea is to create values of type Html, e.g. primHtml, combine them
to make bigger document, e.g. with p or (+++), possibly with some
attributes, e.g. with (!), then eventually render the final Html
value, e.g. with prettyHtmlFragment.
Try it in ghci!
More information about the Haskell-Cafe