HaXml-1.25.11: Utilities for manipulating XML documents
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.XML.HaXml.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)] Source #

Symbol table operations

addST :: String -> a -> SymTab a -> SymTab a Source #

XML Types

The top-level document container

data Document i Source #

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

Constructors

Document Prolog (SymTab EntityDef) (Element i) [Misc] 

Instances

Instances details
Functor Document Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

fmap :: (a -> b) -> Document a -> Document b Source #

(<$) :: a -> Document b -> Document a Source #

Show i => Show (Document i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq (Document i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: Document i -> Document i -> Bool Source #

(/=) :: Document i -> Document i -> Bool Source #

The main document content

data Element i Source #

Constructors

Elem QName [Attribute] [Content i] 

Instances

Instances details
Functor Element Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

fmap :: (a -> b) -> Element a -> Element b Source #

(<$) :: a -> Element b -> Element a Source #

Verbatim (Element i) Source # 
Instance details

Defined in Text.XML.HaXml.Verbatim

Methods

verbatim :: Element i -> String Source #

Show i => Show (Element i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq (Element i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: Element i -> Element i -> Bool Source #

(/=) :: Element i -> Element i -> Bool Source #

data ElemTag Source #

Constructors

ElemTag QName [Attribute] 

Instances

Instances details
Eq ElemTag Source # 
Instance details

Defined in Text.XML.HaXml.Types

data Content i Source #

Constructors

CElem (Element i) i 
CString Bool CharData i

bool is whether whitespace is significant

CRef Reference i 
CMisc Misc i 

Instances

Instances details
Functor Content Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

fmap :: (a -> b) -> Content a -> Content b Source #

(<$) :: a -> Content b -> Content a Source #

Verbatim (Content i) Source # 
Instance details

Defined in Text.XML.HaXml.Verbatim

Methods

verbatim :: Content i -> String Source #

Show i => Show (Content i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq (Content i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: Content i -> Content i -> Bool Source #

(/=) :: Content i -> Content i -> Bool Source #

data AttValue Source #

Instances

Instances details
Verbatim AttValue Source # 
Instance details

Defined in Text.XML.HaXml.Verbatim

Show AttValue Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq AttValue Source # 
Instance details

Defined in Text.XML.HaXml.Types

info :: Content t -> t Source #

Administrative parts of the document

data Prolog Source #

Constructors

Prolog (Maybe XMLDecl) [Misc] (Maybe DocTypeDecl) [Misc] 

Instances

Instances details
Show Prolog Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Prolog Source # 
Instance details

Defined in Text.XML.HaXml.Types

data XMLDecl Source #

Instances

Instances details
Show XMLDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq XMLDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data Misc Source #

Instances

Instances details
Show Misc Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Misc Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: Misc -> Misc -> Bool Source #

(/=) :: Misc -> Misc -> Bool Source #

The DTD

content model

data DocTypeDecl Source #

Constructors

DTD QName (Maybe ExternalID) [MarkupDecl] 

Instances

Instances details
Show DocTypeDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq DocTypeDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data ExtSubset Source #

Instances

Instances details
Show ExtSubset Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq ExtSubset Source # 
Instance details

Defined in Text.XML.HaXml.Types

data ContentSpec Source #

Constructors

EMPTY 
ANY 
Mixed Mixed 
ContentSpec CP 

Instances

Instances details
Show ContentSpec Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq ContentSpec Source # 
Instance details

Defined in Text.XML.HaXml.Types

data CP Source #

Instances

Instances details
Show CP Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq CP Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: CP -> CP -> Bool Source #

(/=) :: CP -> CP -> Bool Source #

data Modifier Source #

Constructors

None

Just One

Query

Zero Or One

Star

Zero Or More

Plus

One Or More

Instances

Instances details
Show Modifier Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Modifier Source # 
Instance details

Defined in Text.XML.HaXml.Types

data Mixed Source #

Constructors

PCDATA 
PCDATAplus [QName] 

Instances

Instances details
Show Mixed Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Mixed Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: Mixed -> Mixed -> Bool Source #

(/=) :: Mixed -> Mixed -> Bool Source #

attribute model

data AttListDecl Source #

Constructors

AttListDecl QName [AttDef] 

Instances

Instances details
Show AttListDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq AttListDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data AttDef Source #

Instances

Instances details
Show AttDef Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq AttDef Source # 
Instance details

Defined in Text.XML.HaXml.Types

data AttType Source #

Instances

Instances details
Show AttType Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq AttType Source # 
Instance details

Defined in Text.XML.HaXml.Types

data FIXED Source #

Constructors

FIXED 

Instances

Instances details
Show FIXED Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq FIXED Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: FIXED -> FIXED -> Bool Source #

(/=) :: FIXED -> FIXED -> Bool Source #

conditional sections

data Ignore Source #

Constructors

Ignore 

Instances

Instances details
Show Ignore Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Ignore Source # 
Instance details

Defined in Text.XML.HaXml.Types

References

data Reference Source #

Instances

Instances details
Verbatim Reference Source # 
Instance details

Defined in Text.XML.HaXml.Verbatim

Show Reference Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Reference Source # 
Instance details

Defined in Text.XML.HaXml.Types

Entities

data EntityDecl Source #

Instances

Instances details
Show EntityDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq EntityDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data GEDecl Source #

Constructors

GEDecl Name EntityDef 

Instances

Instances details
Show GEDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq GEDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data PEDecl Source #

Constructors

PEDecl Name PEDef 

Instances

Instances details
Show PEDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq PEDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data PEDef Source #

Instances

Instances details
Show PEDef Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq PEDef Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: PEDef -> PEDef -> Bool Source #

(/=) :: PEDef -> PEDef -> Bool Source #

newtype NDataDecl Source #

Constructors

NDATA Name 

Instances

Instances details
Show NDataDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq NDataDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data TextDecl Source #

Instances

Instances details
Show TextDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq TextDecl Source # 
Instance details

Defined in Text.XML.HaXml.Types

data ExtParsedEnt i Source #

Constructors

ExtParsedEnt (Maybe TextDecl) (Content i) 

Instances

Instances details
Show i => Show (ExtParsedEnt i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq (ExtParsedEnt i) Source # 
Instance details

Defined in Text.XML.HaXml.Types

data ExtPE Source #

Constructors

ExtPE (Maybe TextDecl) [ExtSubsetDecl] 

Instances

Instances details
Show ExtPE Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq ExtPE Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: ExtPE -> ExtPE -> Bool Source #

(/=) :: ExtPE -> ExtPE -> Bool Source #

newtype PublicID Source #

Constructors

PUBLICID PubidLiteral 

Instances

Instances details
Show PublicID Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq PublicID Source # 
Instance details

Defined in Text.XML.HaXml.Types

data EntityValue Source #

Constructors

EntityValue [EV] 

Instances

Instances details
Show EntityValue Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq EntityValue Source # 
Instance details

Defined in Text.XML.HaXml.Types

data EV Source #

Instances

Instances details
Show EV Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq EV Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: EV -> EV -> Bool Source #

(/=) :: EV -> EV -> Bool Source #

Namespaces

data QName Source #

A QName is a (possibly) qualified name, in the sense of XML namespaces.

Constructors

N Name 
QN Namespace Name 

Instances

Instances details
Show QName Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq QName Source # 
Instance details

Defined in Text.XML.HaXml.Types

Methods

(==) :: QName -> QName -> Bool Source #

(/=) :: QName -> QName -> Bool Source #

Ord QName Source # 
Instance details

Defined in Text.XML.HaXml.Types

data Namespace Source #

Namespaces are not defined in the XML spec itself, but at http://www.w3.org/TR/xml-names

Constructors

Namespace 

Fields

Instances

Instances details
Show Namespace Source # 
Instance details

Defined in Text.XML.HaXml.Types

Eq Namespace Source # 
Instance details

Defined in Text.XML.HaXml.Types

Basic value types

type Names = [Name] Source #