xhtml-combinators-0.1: Fast and easy to use XHTML combinators.

Text.XHtmlCombinators

Contents

Synopsis

Types

XHtml

type XHtmlM x a = Writer (Seq x) aSource

type XHtml x = XHtmlM x ()Source

data Page Source

Instances

type Attrs = [Attr]Source

data Attr Source

Constructors

Attr Text Text 

Instances

Element Types

Misc Element Types

List Element Types

Field Element Types

Table Element Types

Combinators

html'Source

Arguments

:: Bool

True for XML declaration, false to omit.

-> Attrs 
-> XHtml TopLevelContent 
-> XHtml Page 

text :: CData c => Text -> XHtml cSource

Document Head

meta'Source

Arguments

:: Text

Required content attribute.

-> Attrs 
-> XHtml HeadContent 

link :: XHtml HeadContentSource

link is a bit useless without any attributes, but it's included anyway for consistency reasons.

style'Source

Arguments

:: Text

Required type attribute.

-> Attrs 
-> Text 
-> XHtml HeadContent 

script'Source

Arguments

:: Text

Required type attribute.

-> Attrs 
-> Text 
-> XHtml HeadContent 

Document Body

Paragraphs

Headings

Lists

Definition Lists

Address

Horizontal Rule

hr' :: Block c => Attrs -> XHtml cSource

hr :: Block c => XHtml cSource

Preformatted Text

Block-like Quotes

Inserted/Deleted Text

ins' :: (Flow c, Content c) => Attrs -> XHtml c -> XHtml cSource

ins :: (Flow c, Content c) => XHtml c -> XHtml cSource

del' :: (Flow c, Content c) => Attrs -> XHtml c -> XHtml cSource

del :: (Flow c, Content c) => XHtml c -> XHtml cSource

The Anchor Element

Inline Elements

bdo'Source

Arguments

:: Inline c 
=> Text

Required language direction code.

-> Attrs 
-> XHtml InlineContent 
-> XHtml c 

Object

Images

img'Source

Arguments

:: Flow c 
=> Text

Required src attribute.

-> Text

Required alt attribute.

-> Attrs 
-> XHtml c 

img :: Flow c => Text -> Text -> XHtml cSource

Client-side image maps

map'Source

Arguments

:: Flow c 
=> Text

Required id attribute.

-> Attrs 
-> XHtml MapContent 
-> XHtml c 

area'Source

Arguments

:: Text

Required alt attribute.

-> Attrs 
-> XHtml MapContent 

Forms

form'Source

Arguments

:: Block c 
=> Text

Required action attribute.

-> Attrs 
-> XHtml FlowContent 
-> XHtml c 

optgroup'Source

Arguments

:: Text

Required label attribute.

-> Attrs 
-> XHtml OptionContent 
-> XHtml OptionContent 

textarea'Source

Arguments

:: Inline c 
=> Int

Required rows attribute.

-> Int

Required cols attribute.

-> Attrs 
-> Text 
-> XHtml c 

textarea :: Inline c => Int -> Int -> Text -> XHtml cSource

Tables

Rendering

render :: Content c => XHtml c -> TextSource

Quickly render a xhtml page to text.

This function will render the entire page on a single line, which is somewhat unreadable. On the plus side, it's relatively fast.