[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Re: Xhtml?

Subject: Re: [Haskell-cafe] Re: Xhtml?
From: minh thu
Date: Wed, 13 Jan 2010 15:56:30 +0100
2010/1/13 Günther Schmidt <[email protected]>:
> Am 13.01.10 15:31, schrieb Günther Schmidt:
>>
>> Hi,
>>
>> 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
>> homework.
>>
>> 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?
>>
>> Günther

Hi,

By Xhtml, do you mean the xhtml package on hackage [1] ?

Maybe to get you started:

$ ghci
Prelude> :m + Text.XHtml.Strict
Prelude Text.XHtml.Strict> putStrLn . prettyHtmlFragment $ p (primHtml
"hello") ! [theclass "foo"]
<p class="foo">
   hello
</p>

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!

HTH, cheers
Thu



[1] http://hackage.haskell.org/package/xhtml
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>