|
|
|
|
Contents |
- A simple symbol table mapping strings (references) to values.
- Symbol table operations
- XML Types
- The top-level document container
- The main document content
- Administrative parts of the document
- The DTD
- content model
- attribute model
- conditional sections
- References
- Entities
- Basic value types
|
|
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 |
The symbol table stored in a document holds all its general entity
reference definitions. | Constructors | |
|
|
The main document content |
|
data Element |
|
|
data ElemTag |
|
|
data Content |
|
|
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 |
Constructors | None | Just One | Query | Zero Or One | Star | Zero Or More | Plus | One Or More |
|
|
|
data Mixed |
|
|
attribute model |
|
data AttListDecl |
|
|
data AttDef |
|
|
data AttType |
|
|
data TokenizedType |
Constructors | ID | | IDREF | | IDREFS | | ENTITY | | ENTITIES | | NMTOKEN | | NMTOKENS | |
|
|
|
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 = String |
|
type PEReference = Name |
|
Entities |
|
data EntityDecl |
|
|
data GEDecl |
|
|
data PEDecl |
|
|
data EntityDef |
|
|
data PEDef |
|
|
data ExternalID |
|
|
data NDataDecl |
|
|
data TextDecl |
|
|
data ExtParsedEnt |
|
|
data ExtPE |
|
|
data NotationDecl |
|
|
data PublicID |
|
|
data EncodingDecl |
|
|
data EntityValue |
|
|
data EV |
|
|
data PubidLiteral |
|
|
data 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.4 |