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

Copyright(c) Niklas Broberg 2008-2013
LicenseBSD-style (see the file LICENSE.txt)
MaintainerNiklas Broberg, niklas.broberg@gmail.com
Stabilityexperimental
PortabilityHaskell 98
Safe HaskellSafe
LanguageHaskell98

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 Source # 

Methods

showsPrec :: Int -> XML -> ShowS #

show :: XML -> String #

showList :: [XML] -> ShowS #

(Functor m, Monad m) => XMLGenerator (HSPT XML m) Source # 
(Functor m, Monad m) => XMLGen (HSPT XML m) Source # 

Associated Types

type XMLType (HSPT XML m :: * -> *) :: * Source #

type StringType (HSPT XML m :: * -> *) :: * Source #

data ChildType (HSPT XML m :: * -> *) :: * Source #

data AttributeType (HSPT XML m :: * -> *) :: * Source #

(Functor m, Monad m) => AppendChild (HSPT XML m) XML Source # 
(Functor m, Monad m) => SetAttr (HSPT XML m) XML Source # 
(Monad m, Functor m) => EmbedAsAttr (HSPT XML m) Attribute Source # 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) () Source # 

Methods

asChild :: () -> GenChildList (HSPT XML m) Source #

(Functor m, Monad m) => EmbedAsChild (HSPT XML m) Char Source # 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) Text Source # 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) Text Source # 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) String Source # 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) XML Source # 
(Functor m, Monad m) => EmbedAsChild (HSPT XML m) [XML] Source # 

Methods

asChild :: [XML] -> GenChildList (HSPT XML m) Source #

(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text ()) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text ()) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Int) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Int) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Bool) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Bool) Source # 
(Monad m, Functor m) => EmbedAsAttr (HSPT XML m) (Attr Text Char) Source # 
(Monad m, Functor m) => EmbedAsAttr (HSPT XML m) (Attr Text Char) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) Source # 
(Functor m, Monad m) => EmbedAsAttr (HSPT XML m) (Attr Text Text) Source # 
type XMLType (HSPT XML m) Source # 
type XMLType (HSPT XML m) = XML
type StringType (HSPT XML m) Source # 
type StringType (HSPT XML m) = Text
data ChildType (HSPT XML m) Source # 
data AttributeType (HSPT XML m) Source # 

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

type Children = [XML] Source #

pcdata :: Text -> XML Source #

Embeds a string as a CDATA XML value.

cdata :: Text -> XML Source #

Embeds a string as a CDATA XML value.

The Attribute type

data AttrValue Source #

Represents an attribue value.

Constructors

Value Bool Text 
NoValue 

attrVal :: Text -> AttrValue Source #

Create an attribue value from a string.

pAttrVal :: Text -> AttrValue Source #

Create an attribue value from a string.

Functions

renderXML :: XML -> Text Source #

Pretty-prints XML values.

isElement :: XML -> Bool Source #

Test whether an XML value is an Element or CDATA

isCDATA :: XML -> Bool Source #

Test whether an XML value is an Element or CDATA