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

PortabilityHaskell 98
Stabilityexperimental
MaintainerNiklas Broberg, niklas.broberg@gmail.com
Safe HaskellNone

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

Show XML 
(Functor m, Monad m) => XMLGenerator (HSPT XML m) 
(Functor m, Monad m) => XMLGen (HSPT XML m) 
(Functor m, Monad m) => AppendChild (HSPT XML m) XML 
(Functor m, Monad m) => SetAttr (HSPT XML m) XML 
(Monad m, Functor m) => EmbedAsAttr (HSPT XML m) Attribute 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) () 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) Char 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) Text 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) Text 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) String 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) XML 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) [XML] 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text ()) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text ()) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Int) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Int) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Bool) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Bool) 
(Monad m, Functor m) => EmbedAsAttr (HSPT XML m) (Attr Text Char) 
(Monad m, Functor m) => EmbedAsAttr (HSPT XML m) (Attr Text Char) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) 

data XMLMetaData Source

The XMLMetaData datatype

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

See also: setMetaData and withMetaData

Constructors

XMLMetaData 

Fields

doctype :: (Bool, Text)

(show doctype when rendering, DOCTYPE string)

contentType :: Text
 
preferredRenderer :: XML -> Builder
 

type NSName = (Namespace, Text)Source

pcdata :: Text -> XMLSource

Embeds a string as a CDATA XML value.

cdata :: Text -> XMLSource

Embeds a string as a CDATA XML value.

The Attribute type

newtype Attribute Source

Constructors

MkAttr (NSName, AttrValue) 

data AttrValue Source

Represents an attribue value.

Constructors

Value Bool Text 
NoValue 

Instances

attrVal :: Text -> AttrValueSource

Create an attribue value from a string.

pAttrVal :: Text -> AttrValueSource

Create an attribue value from a string.

Functions

renderXML :: XML -> TextSource

Pretty-prints XML values.

isElement :: XML -> BoolSource

Test whether an XML value is an Element or CDATA

isCDATA :: XML -> BoolSource

Test whether an XML value is an Element or CDATA