HaXml-1.13.3: Utilities for manipulating XML documents

Text.XML.HaXml.Types

Contents

Description

This module defines an internal (generic) representation for XML documents including their DTDs.

History: The original module was derived by hand from the XML specification, following the grammar precisely. Then we simplified the types, removing layers of indirection and redundancy, and generally making things easier to work with. Then we allowed PEReferences to be ubiquitous, by removing them from the types and resolving all PE references at parse-time. Finally, we added a per-document symbol table for GEReferences, and a whitespace-significance flag for plaintext.

Synopsis

A simple symbol table mapping strings (references) to values.

type SymTab a = [(String, a)]Source

Symbol table operations

addST :: String -> a -> SymTab a -> SymTab aSource

XML Types

The top-level document container

data Document Source

The symbol table stored in a document holds all its general entity reference definitions.

The main document content

data Element Source

Constructors

Elem Name [Attribute] [Content] 

Instances

data ElemTag Source

Constructors

ElemTag Name [Attribute]

intermediate for parsing

Instances

data Content Source

Constructors

CElem Element 
CString Bool CharData

bool is whether whitespace is significant

CRef Reference 
CMisc Misc 

Instances

data AttValue Source

Instances

Administrative parts of the document

The DTD

content model

data CP Source

Instances

data Modifier Source

Constructors

None

Just One

Query

Zero Or One

Star

Zero Or More

Plus

One Or More

Instances

data Mixed Source

Constructors

PCDATA 
PCDATAplus [Name] 

attribute model

data FIXED Source

Constructors

FIXED 

conditional sections

data Ignore Source

Constructors

Ignore 

References

Entities

data GEDecl Source

Constructors

GEDecl Name EntityDef 

data PEDecl Source

Constructors

PEDecl Name PEDef 

newtype NDataDecl Source

Constructors

NDATA Name 

newtype PublicID Source

Constructors

PUBLICID PubidLiteral 

newtype EncodingDecl Source

Constructors

EncodingDecl String 

data EntityValue Source

Constructors

EntityValue [EV] 

data EV Source

newtype PubidLiteral Source

Constructors

PubidLiteral String 

Basic value types

type Names = [Name]Source