hsp-0.5.2: Haskell Server Pages is a library for writing dynamic server-side web pages.Source codeContentsIndex
HSP.XML
PortabilityHaskell 98
Stabilityexperimental
MaintainerNiklas Broberg, nibro@cs.chalmers.se
Contents
The XML datatype
The Attribute type
Functions
Description
Datatypes and type classes comprising the basic model behind the scenes of Haskell Server Pages tags.
Synopsis
data XML
= Element Name Attributes Children
| CDATA Bool String
data XMLMetaData = XMLMetaData {
doctype :: (Bool, String)
contentType :: String
preferredRenderer :: XML -> String
}
type Domain = Maybe String
type Name = (Domain, String)
type Attributes = [Attribute]
type Children = [XML]
pcdata :: String -> XML
cdata :: String -> XML
newtype Attribute = MkAttr (Name, AttrValue)
data AttrValue = Value Bool String
attrVal :: String -> AttrValue
pAttrVal :: String -> AttrValue
renderXML :: XML -> String
isElement :: XML -> Bool
isCDATA :: XML -> Bool
The XML datatype
data XML Source
The XML datatype representation. Is either an Element or CDATA.
Constructors
Element Name Attributes Children
CDATA Bool String
data XMLMetaData Source

The XMLMetaData datatype

Specify the DOCTYPE, content-type, and preferred render for XML data.

See also: HSP.Monad.setMetaData and HSP.Monad.withMetaData

Constructors
XMLMetaData
doctype :: (Bool, String)(show doctype when rendering, DOCTYPE string)
contentType :: String
preferredRenderer :: XML -> String
type Domain = Maybe StringSource
type Name = (Domain, String)Source
type Attributes = [Attribute]Source
type Children = [XML]Source
pcdata :: String -> XMLSource
Embeds a string as a CDATA XML value.
cdata :: String -> XMLSource
The Attribute type
newtype Attribute Source
Constructors
MkAttr (Name, AttrValue)
data AttrValue Source
Represents an attribue value.
Constructors
Value Bool String
attrVal :: String -> AttrValueSource
pAttrVal :: String -> AttrValueSource
Create an attribue value from a string.
Functions
renderXML :: XML -> StringSource
Pretty-prints XML values.
isElement :: XML -> BoolSource
isCDATA :: XML -> BoolSource
Test whether an XML value is an Element or CDATA
Produced by Haddock version 2.6.1