HaXml-1.25.14: Utilities for manipulating XML documents

Safe Haskell | Safe-Inferred
Language | Haskell98

Text.XML.HaXml.Types

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
  - Namespaces
  - 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

- type SymTab a = [(String, a)]
- emptyST :: SymTab a
- addST :: String -> a -> SymTab a -> SymTab a
- lookupST :: String -> SymTab a -> Maybe a
- data Document i = Document Prolog (SymTab EntityDef) (Element i) [Misc]
- data Element i = Elem QName [Attribute] [Content i]
- data ElemTag = ElemTag QName [Attribute]
- data Content i
  - = CElem (Element i) i
  - | CString Bool CharData i
  - | CRef Reference i
  - | CMisc Misc i
- type Attribute = (QName, AttValue)
- data AttValue = AttValue [Either String Reference]
- info :: Content t -> t
- data Prolog = Prolog (Maybe XMLDecl) [Misc] (Maybe DocTypeDecl) [Misc]
- data XMLDecl = XMLDecl VersionInfo (Maybe EncodingDecl) (Maybe SDDecl)
- data Misc
  - = Comment Comment
  - | PI ProcessingInstruction
- type ProcessingInstruction = (PITarget, String)
- type SDDecl = Bool
- type VersionInfo = String
- type Comment = String
- type PITarget = String
- data DocTypeDecl = DTD QName (Maybe ExternalID) [MarkupDecl]
- data MarkupDecl
  - = Element ElementDecl
  - | AttList AttListDecl
  - | Entity EntityDecl
  - | Notation NotationDecl
  - | MarkupMisc Misc
- data ExtSubset = ExtSubset (Maybe TextDecl) [ExtSubsetDecl]
- data ExtSubsetDecl
  - = ExtMarkupDecl MarkupDecl
  - | ExtConditionalSect ConditionalSect
- data ElementDecl = ElementDecl QName ContentSpec
- data ContentSpec
  - = EMPTY
  - | ANY
  - | Mixed Mixed
  - | ContentSpec CP
- data CP
  - = TagName QName Modifier
  - | Choice [CP] Modifier
  - | Seq [CP] Modifier
- data Modifier
  - = None
  - | Query
  - | Star
  - | Plus
- data Mixed
  - = PCDATA
  - | PCDATAplus [QName]
- data AttListDecl = AttListDecl QName [AttDef]
- data AttDef = AttDef QName AttType DefaultDecl
- data AttType
  - = StringType
  - | TokenizedType TokenizedType
  - | EnumeratedType EnumeratedType
- data TokenizedType
  - = ID
  - | IDREF
  - | IDREFS
  - | ENTITY
  - | ENTITIES
  - | NMTOKEN
  - | NMTOKENS
- data EnumeratedType
  - = NotationType NotationType
  - | Enumeration Enumeration
- type NotationType = [Name]
- type Enumeration = [NmToken]
- data DefaultDecl
  - = REQUIRED
  - | IMPLIED
  - | DefaultTo AttValue (Maybe FIXED)
- data FIXED = FIXED
- data ConditionalSect
  - = IncludeSect IncludeSect
  - | IgnoreSect IgnoreSect
- type IncludeSect = [ExtSubsetDecl]
- type IgnoreSect = [IgnoreSectContents]
- data Ignore = Ignore
- data IgnoreSectContents = IgnoreSectContents Ignore [(IgnoreSectContents, Ignore)]
- data Reference
  - = RefEntity EntityRef
  - | RefChar CharRef
- type EntityRef = Name
- type CharRef = Int
- type PEReference = Name
- data EntityDecl
  - = EntityGEDecl GEDecl
  - | EntityPEDecl PEDecl
- data GEDecl = GEDecl Name EntityDef
- data PEDecl = PEDecl Name PEDef
- data EntityDef
  - = DefEntityValue EntityValue
  - | DefExternalID ExternalID (Maybe NDataDecl)
- data PEDef
  - = PEDefEntityValue EntityValue
  - | PEDefExternalID ExternalID
- data ExternalID
  - = SYSTEM SystemLiteral
  - | PUBLIC PubidLiteral SystemLiteral
- newtype NDataDecl = NDATA Name
- data TextDecl = TextDecl (Maybe VersionInfo) EncodingDecl
- data ExtParsedEnt i = ExtParsedEnt (Maybe TextDecl) (Content i)
- data ExtPE = ExtPE (Maybe TextDecl) [ExtSubsetDecl]
- data NotationDecl = NOTATION Name (Either ExternalID PublicID)
- newtype PublicID = PUBLICID PubidLiteral
- newtype EncodingDecl = EncodingDecl String
- data EntityValue = EntityValue [EV]
- data EV
  - = EVString String
  - | EVRef Reference
- newtype PubidLiteral = PubidLiteral String
- newtype SystemLiteral = SystemLiteral String
- data QName
  - = N Name
  - | QN Namespace Name
- data Namespace = Namespace {
  - nsPrefix :: String
  - nsURI :: String
  }
- type Name = String
- type Names = [Name]
- type NmToken = String
- type NmTokens = [NmToken]
- type CharData = String
- type CDSect = CharData

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

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

## Symbol table operations

emptyST :: SymTab a Source #

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

lookupST :: String -> SymTab a -> Maybe 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 Methods showsPrec :: Int -> Document i -> ShowS Source # show :: Document i -> String Source # showList :: [Document i] -> ShowS Source #
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 Methods showsPrec :: Int -> Element i -> ShowS Source # show :: Element i -> String Source # showList :: [Element i] -> ShowS Source #
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 Methods (==) :: ElemTag -> ElemTag -> Bool Source # (/=) :: ElemTag -> ElemTag -> Bool Source #

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 Methods showsPrec :: Int -> Content i -> ShowS Source # show :: Content i -> String Source # showList :: [Content i] -> ShowS Source #
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 #

type Attribute = (QName, AttValue) Source #

data AttValue Source #

Constructors

AttValue [Either String Reference] |

#### Instances

Instances details

Verbatim AttValue Source # |
Instance details Defined in Text.XML.HaXml.Verbatim Methods verbatim :: AttValue -> String Source #
Show AttValue Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> AttValue -> ShowS Source # show :: AttValue -> String Source # showList :: [AttValue] -> ShowS Source #
Eq AttValue Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: AttValue -> AttValue -> Bool Source # (/=) :: AttValue -> AttValue -> Bool Source #

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 Methods showsPrec :: Int -> Prolog -> ShowS Source # show :: Prolog -> String Source # showList :: [Prolog] -> ShowS Source #
Eq Prolog Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Prolog -> Prolog -> Bool Source # (/=) :: Prolog -> Prolog -> Bool Source #

data XMLDecl Source #

Constructors

XMLDecl VersionInfo (Maybe EncodingDecl) (Maybe SDDecl) |

#### Instances

Instances details

Show XMLDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> XMLDecl -> ShowS Source # show :: XMLDecl -> String Source # showList :: [XMLDecl] -> ShowS Source #
Eq XMLDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: XMLDecl -> XMLDecl -> Bool Source # (/=) :: XMLDecl -> XMLDecl -> Bool Source #

data Misc Source #

Constructors

Comment Comment |
PI ProcessingInstruction |

#### Instances

Instances details

Show Misc Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Misc -> ShowS Source # show :: Misc -> String Source # showList :: [Misc] -> ShowS Source #
Eq Misc Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Misc -> Misc -> Bool Source # (/=) :: Misc -> Misc -> Bool Source #

type ProcessingInstruction = (PITarget, String) Source #

type SDDecl = Bool Source #

type VersionInfo = String Source #

type Comment = String Source #

type PITarget = String 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 Methods showsPrec :: Int -> DocTypeDecl -> ShowS Source # show :: DocTypeDecl -> String Source # showList :: [DocTypeDecl] -> ShowS Source #
Eq DocTypeDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: DocTypeDecl -> DocTypeDecl -> Bool Source # (/=) :: DocTypeDecl -> DocTypeDecl -> Bool Source #

data MarkupDecl Source #

Constructors

Element ElementDecl |
AttList AttListDecl |
Entity EntityDecl |
Notation NotationDecl |
MarkupMisc Misc |

#### Instances

Instances details

Show MarkupDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> MarkupDecl -> ShowS Source # show :: MarkupDecl -> String Source # showList :: [MarkupDecl] -> ShowS Source #
Eq MarkupDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: MarkupDecl -> MarkupDecl -> Bool Source # (/=) :: MarkupDecl -> MarkupDecl -> Bool Source #

data ExtSubset Source #

Constructors

ExtSubset (Maybe TextDecl) [ExtSubsetDecl] |

#### Instances

Instances details

Show ExtSubset Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ExtSubset -> ShowS Source # show :: ExtSubset -> String Source # showList :: [ExtSubset] -> ShowS Source #
Eq ExtSubset Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ExtSubset -> ExtSubset -> Bool Source # (/=) :: ExtSubset -> ExtSubset -> Bool Source #

data ExtSubsetDecl Source #

Constructors

ExtMarkupDecl MarkupDecl |
ExtConditionalSect ConditionalSect |

#### Instances

Instances details

Show ExtSubsetDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ExtSubsetDecl -> ShowS Source # show :: ExtSubsetDecl -> String Source # showList :: [ExtSubsetDecl] -> ShowS Source #
Eq ExtSubsetDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ExtSubsetDecl -> ExtSubsetDecl -> Bool Source # (/=) :: ExtSubsetDecl -> ExtSubsetDecl -> Bool Source #

data ElementDecl Source #

Constructors

ElementDecl QName ContentSpec |

#### Instances

Instances details

Show ElementDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ElementDecl -> ShowS Source # show :: ElementDecl -> String Source # showList :: [ElementDecl] -> ShowS Source #
Eq ElementDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ElementDecl -> ElementDecl -> Bool Source # (/=) :: ElementDecl -> ElementDecl -> Bool Source #

data ContentSpec Source #

Constructors

EMPTY |
ANY |
Mixed Mixed |
ContentSpec CP |

#### Instances

Instances details

Show ContentSpec Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ContentSpec -> ShowS Source # show :: ContentSpec -> String Source # showList :: [ContentSpec] -> ShowS Source #
Eq ContentSpec Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ContentSpec -> ContentSpec -> Bool Source # (/=) :: ContentSpec -> ContentSpec -> Bool Source #

data CP Source #

Constructors

TagName QName Modifier |
Choice [CP] Modifier |
Seq [CP] Modifier |

#### Instances

Instances details

Show CP Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> CP -> ShowS Source # show :: CP -> String Source # showList :: [CP] -> ShowS Source #
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 Methods showsPrec :: Int -> Modifier -> ShowS Source # show :: Modifier -> String Source # showList :: [Modifier] -> ShowS Source #
Eq Modifier Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Modifier -> Modifier -> Bool Source # (/=) :: Modifier -> Modifier -> Bool Source #

data Mixed Source #

Constructors

PCDATA |
PCDATAplus [QName] |

#### Instances

Instances details

Show Mixed Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Mixed -> ShowS Source # show :: Mixed -> String Source # showList :: [Mixed] -> ShowS Source #
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 Methods showsPrec :: Int -> AttListDecl -> ShowS Source # show :: AttListDecl -> String Source # showList :: [AttListDecl] -> ShowS Source #
Eq AttListDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: AttListDecl -> AttListDecl -> Bool Source # (/=) :: AttListDecl -> AttListDecl -> Bool Source #

data AttDef Source #

Constructors

AttDef QName AttType DefaultDecl |

#### Instances

Instances details

Show AttDef Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> AttDef -> ShowS Source # show :: AttDef -> String Source # showList :: [AttDef] -> ShowS Source #
Eq AttDef Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: AttDef -> AttDef -> Bool Source # (/=) :: AttDef -> AttDef -> Bool Source #

data AttType Source #

Constructors

StringType |
TokenizedType TokenizedType |
EnumeratedType EnumeratedType |

#### Instances

Instances details

Show AttType Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> AttType -> ShowS Source # show :: AttType -> String Source # showList :: [AttType] -> ShowS Source #
Eq AttType Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: AttType -> AttType -> Bool Source # (/=) :: AttType -> AttType -> Bool Source #

data TokenizedType Source #

Constructors

ID |
IDREF |
IDREFS |
ENTITY |
ENTITIES |
NMTOKEN |
NMTOKENS |

#### Instances

Instances details

Show TokenizedType Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> TokenizedType -> ShowS Source # show :: TokenizedType -> String Source # showList :: [TokenizedType] -> ShowS Source #
Eq TokenizedType Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: TokenizedType -> TokenizedType -> Bool Source # (/=) :: TokenizedType -> TokenizedType -> Bool Source #

data EnumeratedType Source #

Constructors

NotationType NotationType |
Enumeration Enumeration |

#### Instances

Instances details

Show EnumeratedType Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> EnumeratedType -> ShowS Source # show :: EnumeratedType -> String Source # showList :: [EnumeratedType] -> ShowS Source #
Eq EnumeratedType Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: EnumeratedType -> EnumeratedType -> Bool Source # (/=) :: EnumeratedType -> EnumeratedType -> Bool Source #

type NotationType = [Name] Source #

type Enumeration = [NmToken] Source #

data DefaultDecl Source #

Constructors

REQUIRED |
IMPLIED |
DefaultTo AttValue (Maybe FIXED) |

#### Instances

Instances details

Show DefaultDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> DefaultDecl -> ShowS Source # show :: DefaultDecl -> String Source # showList :: [DefaultDecl] -> ShowS Source #
Eq DefaultDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: DefaultDecl -> DefaultDecl -> Bool Source # (/=) :: DefaultDecl -> DefaultDecl -> Bool Source #

data FIXED Source #

Constructors

FIXED |

#### Instances

Instances details

Show FIXED Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> FIXED -> ShowS Source # show :: FIXED -> String Source # showList :: [FIXED] -> ShowS Source #
Eq FIXED Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: FIXED -> FIXED -> Bool Source # (/=) :: FIXED -> FIXED -> Bool Source #

### conditional sections

data ConditionalSect Source #

Constructors

IncludeSect IncludeSect |
IgnoreSect IgnoreSect |

#### Instances

Instances details

Show ConditionalSect Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ConditionalSect -> ShowS Source # show :: ConditionalSect -> String Source # showList :: [ConditionalSect] -> ShowS Source #
Eq ConditionalSect Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ConditionalSect -> ConditionalSect -> Bool Source # (/=) :: ConditionalSect -> ConditionalSect -> Bool Source #

type IncludeSect = [ExtSubsetDecl] Source #

type IgnoreSect = [IgnoreSectContents] Source #

data Ignore Source #

Constructors

Ignore |

#### Instances

Instances details

Show Ignore Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Ignore -> ShowS Source # show :: Ignore -> String Source # showList :: [Ignore] -> ShowS Source #
Eq Ignore Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Ignore -> Ignore -> Bool Source # (/=) :: Ignore -> Ignore -> Bool Source #

data IgnoreSectContents Source #

Constructors

IgnoreSectContents Ignore [(IgnoreSectContents, Ignore)] |

#### Instances

Instances details

Show IgnoreSectContents Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> IgnoreSectContents -> ShowS Source # show :: IgnoreSectContents -> String Source # showList :: [IgnoreSectContents] -> ShowS Source #
Eq IgnoreSectContents Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: IgnoreSectContents -> IgnoreSectContents -> Bool Source # (/=) :: IgnoreSectContents -> IgnoreSectContents -> Bool Source #

## References

data Reference Source #

Constructors

RefEntity EntityRef |
RefChar CharRef |

#### Instances

Instances details

Verbatim Reference Source # |
Instance details Defined in Text.XML.HaXml.Verbatim Methods verbatim :: Reference -> String Source #
Show Reference Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Reference -> ShowS Source # show :: Reference -> String Source # showList :: [Reference] -> ShowS Source #
Eq Reference Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Reference -> Reference -> Bool Source # (/=) :: Reference -> Reference -> Bool Source #

type EntityRef = Name Source #

type CharRef = Int Source #

type PEReference = Name Source #

## Entities

data EntityDecl Source #

Constructors

EntityGEDecl GEDecl |
EntityPEDecl PEDecl |

#### Instances

Instances details

Show EntityDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> EntityDecl -> ShowS Source # show :: EntityDecl -> String Source # showList :: [EntityDecl] -> ShowS Source #
Eq EntityDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: EntityDecl -> EntityDecl -> Bool Source # (/=) :: EntityDecl -> EntityDecl -> Bool Source #

data GEDecl Source #

Constructors

GEDecl Name EntityDef |

#### Instances

Instances details

Show GEDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> GEDecl -> ShowS Source # show :: GEDecl -> String Source # showList :: [GEDecl] -> ShowS Source #
Eq GEDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: GEDecl -> GEDecl -> Bool Source # (/=) :: GEDecl -> GEDecl -> Bool Source #

data PEDecl Source #

Constructors

PEDecl Name PEDef |

#### Instances

Instances details

Show PEDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> PEDecl -> ShowS Source # show :: PEDecl -> String Source # showList :: [PEDecl] -> ShowS Source #
Eq PEDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: PEDecl -> PEDecl -> Bool Source # (/=) :: PEDecl -> PEDecl -> Bool Source #

data EntityDef Source #

Constructors

DefEntityValue EntityValue |
DefExternalID ExternalID (Maybe NDataDecl) |

#### Instances

Instances details

Show EntityDef Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> EntityDef -> ShowS Source # show :: EntityDef -> String Source # showList :: [EntityDef] -> ShowS Source #
Eq EntityDef Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: EntityDef -> EntityDef -> Bool Source # (/=) :: EntityDef -> EntityDef -> Bool Source #

data PEDef Source #

Constructors

PEDefEntityValue EntityValue |
PEDefExternalID ExternalID |

#### Instances

Instances details

Show PEDef Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> PEDef -> ShowS Source # show :: PEDef -> String Source # showList :: [PEDef] -> ShowS Source #
Eq PEDef Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: PEDef -> PEDef -> Bool Source # (/=) :: PEDef -> PEDef -> Bool Source #

data ExternalID Source #

Constructors

SYSTEM SystemLiteral |
PUBLIC PubidLiteral SystemLiteral |

#### Instances

Instances details

Show ExternalID Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ExternalID -> ShowS Source # show :: ExternalID -> String Source # showList :: [ExternalID] -> ShowS Source #
Eq ExternalID Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ExternalID -> ExternalID -> Bool Source # (/=) :: ExternalID -> ExternalID -> Bool Source #

newtype NDataDecl Source #

Constructors

NDATA Name |

#### Instances

Instances details

Show NDataDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> NDataDecl -> ShowS Source # show :: NDataDecl -> String Source # showList :: [NDataDecl] -> ShowS Source #
Eq NDataDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: NDataDecl -> NDataDecl -> Bool Source # (/=) :: NDataDecl -> NDataDecl -> Bool Source #

data TextDecl Source #

Constructors

TextDecl (Maybe VersionInfo) EncodingDecl |

#### Instances

Instances details

Show TextDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> TextDecl -> ShowS Source # show :: TextDecl -> String Source # showList :: [TextDecl] -> ShowS Source #
Eq TextDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: TextDecl -> TextDecl -> Bool Source # (/=) :: TextDecl -> TextDecl -> Bool Source #

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 Methods showsPrec :: Int -> ExtParsedEnt i -> ShowS Source # show :: ExtParsedEnt i -> String Source # showList :: [ExtParsedEnt i] -> ShowS Source #
Eq (ExtParsedEnt i) Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ExtParsedEnt i -> ExtParsedEnt i -> Bool Source # (/=) :: ExtParsedEnt i -> ExtParsedEnt i -> Bool Source #

data ExtPE Source #

Constructors

ExtPE (Maybe TextDecl) [ExtSubsetDecl] |

#### Instances

Instances details

Show ExtPE Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> ExtPE -> ShowS Source # show :: ExtPE -> String Source # showList :: [ExtPE] -> ShowS Source #
Eq ExtPE Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ExtPE -> ExtPE -> Bool Source # (/=) :: ExtPE -> ExtPE -> Bool Source #

data NotationDecl Source #

Constructors

NOTATION Name (Either ExternalID PublicID) |

#### Instances

Instances details

Show NotationDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> NotationDecl -> ShowS Source # show :: NotationDecl -> String Source # showList :: [NotationDecl] -> ShowS Source #
Eq NotationDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: NotationDecl -> NotationDecl -> Bool Source # (/=) :: NotationDecl -> NotationDecl -> Bool Source #

newtype PublicID Source #

Constructors

PUBLICID PubidLiteral |

#### Instances

Instances details

Show PublicID Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> PublicID -> ShowS Source # show :: PublicID -> String Source # showList :: [PublicID] -> ShowS Source #
Eq PublicID Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: PublicID -> PublicID -> Bool Source # (/=) :: PublicID -> PublicID -> Bool Source #

newtype EncodingDecl Source #

Constructors

EncodingDecl String |

#### Instances

Instances details

Show EncodingDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> EncodingDecl -> ShowS Source # show :: EncodingDecl -> String Source # showList :: [EncodingDecl] -> ShowS Source #
Eq EncodingDecl Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: EncodingDecl -> EncodingDecl -> Bool Source # (/=) :: EncodingDecl -> EncodingDecl -> Bool Source #

data EntityValue Source #

Constructors

EntityValue [EV] |

#### Instances

Instances details

Show EntityValue Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> EntityValue -> ShowS Source # show :: EntityValue -> String Source # showList :: [EntityValue] -> ShowS Source #
Eq EntityValue Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: EntityValue -> EntityValue -> Bool Source # (/=) :: EntityValue -> EntityValue -> Bool Source #

data EV Source #

Constructors

EVString String |
EVRef Reference |

#### Instances

Instances details

Show EV Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> EV -> ShowS Source # show :: EV -> String Source # showList :: [EV] -> ShowS Source #
Eq EV Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: EV -> EV -> Bool Source # (/=) :: EV -> EV -> Bool Source #

newtype PubidLiteral Source #

Constructors

PubidLiteral String |

#### Instances

Instances details

Show PubidLiteral Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> PubidLiteral -> ShowS Source # show :: PubidLiteral -> String Source # showList :: [PubidLiteral] -> ShowS Source #
Eq PubidLiteral Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: PubidLiteral -> PubidLiteral -> Bool Source # (/=) :: PubidLiteral -> PubidLiteral -> Bool Source #

newtype SystemLiteral Source #

Constructors

SystemLiteral String |

#### Instances

Instances details

Show SystemLiteral Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> SystemLiteral -> ShowS Source # show :: SystemLiteral -> String Source # showList :: [SystemLiteral] -> ShowS Source #
Eq SystemLiteral Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: SystemLiteral -> SystemLiteral -> Bool Source # (/=) :: SystemLiteral -> SystemLiteral -> 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 Methods showsPrec :: Int -> QName -> ShowS Source # show :: QName -> String Source # showList :: [QName] -> ShowS Source #
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 Methods compare :: QName -> QName -> Ordering Source # (<) :: QName -> QName -> Bool Source # (<=) :: QName -> QName -> Bool Source # (>) :: QName -> QName -> Bool Source # (>=) :: QName -> QName -> Bool Source # max :: QName -> QName -> QName Source # min :: QName -> QName -> QName Source #

data Namespace Source #

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

Constructors

Namespace |

Fields

- nsPrefix :: String
- nsURI :: String

#### Instances

Instances details

Show Namespace Source # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Namespace -> ShowS Source # show :: Namespace -> String Source # showList :: [Namespace] -> ShowS Source #
Eq Namespace Source # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Namespace -> Namespace -> Bool Source # (/=) :: Namespace -> Namespace -> Bool Source #

## Basic value types

type Name = String Source #

type Names = [Name] Source #

type NmToken = String Source #

type NmTokens = [NmToken] Source #

type CharData = String Source #

type CDSect = CharData Source #