hsp-0.5.1: Haskell Server Pages is a library for writing dynamic server-side web pages.

PortabilityHaskell 98
Stabilityexperimental
MaintainerNiklas Broberg, nibro@cs.chalmers.se

HSP.XML

Contents

Description

Datatypes and type classes comprising the basic model behind the scenes of Haskell Server Pages tags.

Synopsis

The XML datatype

data XML Source

The XML datatype representation. Is either an Element or CDATA.

Instances

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 

Fields

doctype :: (Bool, String)

(show doctype when rendering, DOCTYPE string)

contentType :: String
 
preferredRenderer :: XML -> String
 

pcdata :: String -> XMLSource

Embeds a string as a CDATA XML value.

The Attribute type

newtype Attribute Source

Constructors

MkAttr (Name, AttrValue) 

data AttrValue Source

Represents an attribue value.

Constructors

Value Bool String 

Instances

pAttrVal :: String -> AttrValueSource

Create an attribue value from a string.

Functions

renderXML :: XML -> StringSource

Pretty-prints XML values.

isCDATA :: XML -> BoolSource

Test whether an XML value is an Element or CDATA