| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
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)] | ||||||||||||||||||
Symbol table operations | ||||||||||||||||||
emptyST :: SymTab a | ||||||||||||||||||
addST :: String -> a -> SymTab a -> SymTab a | ||||||||||||||||||
lookupST :: String -> SymTab a -> Maybe a | ||||||||||||||||||
XML Types | ||||||||||||||||||
The top-level document container | ||||||||||||||||||
data Document i | ||||||||||||||||||
| ||||||||||||||||||
The main document content | ||||||||||||||||||
data Element i | ||||||||||||||||||
| ||||||||||||||||||
data ElemTag | ||||||||||||||||||
| ||||||||||||||||||
data Content i | ||||||||||||||||||
| ||||||||||||||||||
type Attribute = (Name, AttValue) | ||||||||||||||||||
data AttValue | ||||||||||||||||||
| ||||||||||||||||||
Administrative parts of the document | ||||||||||||||||||
data Prolog | ||||||||||||||||||
| ||||||||||||||||||
data XMLDecl | ||||||||||||||||||
| ||||||||||||||||||
data Misc | ||||||||||||||||||
| ||||||||||||||||||
type ProcessingInstruction = (PITarget, String) | ||||||||||||||||||
type SDDecl = Bool | ||||||||||||||||||
type VersionInfo = String | ||||||||||||||||||
type Comment = String | ||||||||||||||||||
type PITarget = String | ||||||||||||||||||
The DTD | ||||||||||||||||||
content model | ||||||||||||||||||
data DocTypeDecl | ||||||||||||||||||
| ||||||||||||||||||
data MarkupDecl | ||||||||||||||||||
| ||||||||||||||||||
data ExtSubset | ||||||||||||||||||
| ||||||||||||||||||
data ExtSubsetDecl | ||||||||||||||||||
| ||||||||||||||||||
data ElementDecl | ||||||||||||||||||
| ||||||||||||||||||
data ContentSpec | ||||||||||||||||||
| ||||||||||||||||||
data CP | ||||||||||||||||||
| ||||||||||||||||||
data Modifier | ||||||||||||||||||
| ||||||||||||||||||
data Mixed | ||||||||||||||||||
| ||||||||||||||||||
attribute model | ||||||||||||||||||
data AttListDecl | ||||||||||||||||||
| ||||||||||||||||||
data AttDef | ||||||||||||||||||
| ||||||||||||||||||
data AttType | ||||||||||||||||||
| ||||||||||||||||||
data TokenizedType | ||||||||||||||||||
| ||||||||||||||||||
data EnumeratedType | ||||||||||||||||||
| ||||||||||||||||||
type NotationType = [Name] | ||||||||||||||||||
type Enumeration = [NmToken] | ||||||||||||||||||
data DefaultDecl | ||||||||||||||||||
| ||||||||||||||||||
data FIXED | ||||||||||||||||||
| ||||||||||||||||||
conditional sections | ||||||||||||||||||
data ConditionalSect | ||||||||||||||||||
| ||||||||||||||||||
type IncludeSect = [ExtSubsetDecl] | ||||||||||||||||||
type IgnoreSect = [IgnoreSectContents] | ||||||||||||||||||
data Ignore | ||||||||||||||||||
| ||||||||||||||||||
data IgnoreSectContents | ||||||||||||||||||
| ||||||||||||||||||
References | ||||||||||||||||||
data Reference | ||||||||||||||||||
| ||||||||||||||||||
type EntityRef = Name | ||||||||||||||||||
type CharRef = Int | ||||||||||||||||||
type PEReference = Name | ||||||||||||||||||
Entities | ||||||||||||||||||
data EntityDecl | ||||||||||||||||||
| ||||||||||||||||||
data GEDecl | ||||||||||||||||||
| ||||||||||||||||||
data PEDecl | ||||||||||||||||||
| ||||||||||||||||||
data EntityDef | ||||||||||||||||||
| ||||||||||||||||||
data PEDef | ||||||||||||||||||
| ||||||||||||||||||
data ExternalID | ||||||||||||||||||
| ||||||||||||||||||
newtype NDataDecl | ||||||||||||||||||
| ||||||||||||||||||
data TextDecl | ||||||||||||||||||
| ||||||||||||||||||
data ExtParsedEnt i | ||||||||||||||||||
| ||||||||||||||||||
data ExtPE | ||||||||||||||||||
| ||||||||||||||||||
data NotationDecl | ||||||||||||||||||
| ||||||||||||||||||
newtype PublicID | ||||||||||||||||||
| ||||||||||||||||||
newtype EncodingDecl | ||||||||||||||||||
| ||||||||||||||||||
data EntityValue | ||||||||||||||||||
| ||||||||||||||||||
data EV | ||||||||||||||||||
| ||||||||||||||||||
newtype PubidLiteral | ||||||||||||||||||
| ||||||||||||||||||
newtype SystemLiteral | ||||||||||||||||||
| ||||||||||||||||||
Basic value types | ||||||||||||||||||
type Name = String | ||||||||||||||||||
type Names = [Name] | ||||||||||||||||||
type NmToken = String | ||||||||||||||||||
type NmTokens = [NmToken] | ||||||||||||||||||
type CharData = String | ||||||||||||||||||
type CDSect = CharData | ||||||||||||||||||
Produced by Haddock version 0.8 |