Text.XML.HaXml.Types

HaXml-1.25.5: Utilities for manipulating XML documents

Safe Haskell | Safe
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)] #

## 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 symbol table stored in a document holds all its general entity reference definitions.

Constructors

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

Instances

Functor Document # |
Instance details Defined in Text.XML.HaXml.Types Methods fmap :: (a -> b) -> Document a -> Document b # (<$) :: a -> Document b -> Document a #
Eq (Document i) # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Document i -> Document i -> Bool # (/=) :: Document i -> Document i -> Bool #
Show i => Show (Document i) # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Document i -> ShowS # show :: Document i -> String # showList :: [Document i] -> ShowS #

## The main document content

data Element i #

Constructors

Elem QName [Attribute] [Content i] |

Instances

Functor Element # |
Instance details Defined in Text.XML.HaXml.Types Methods fmap :: (a -> b) -> Element a -> Element b # (<$) :: a -> Element b -> Element a #
Eq (Element i) # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Element i -> Element i -> Bool # (/=) :: Element i -> Element i -> Bool #
Show i => Show (Element i) # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Element i -> ShowS # show :: Element i -> String # showList :: [Element i] -> ShowS #
Verbatim (Element i) # |
Instance details Defined in Text.XML.HaXml.Verbatim Methods verbatim :: Element i -> String #

data ElemTag #

Constructors

ElemTag QName [Attribute] |

Instances

Eq ElemTag # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: ElemTag -> ElemTag -> Bool # (/=) :: ElemTag -> ElemTag -> Bool #

data Content i #

Constructors

CElem (Element i) i |
CString Bool CharData i | bool is whether whitespace is significant
CRef Reference i |
CMisc Misc i |

Instances

Functor Content # |
Instance details Defined in Text.XML.HaXml.Types Methods fmap :: (a -> b) -> Content a -> Content b # (<$) :: a -> Content b -> Content a #
Eq (Content i) # |
Instance details Defined in Text.XML.HaXml.Types Methods (==) :: Content i -> Content i -> Bool # (/=) :: Content i -> Content i -> Bool #
Show i => Show (Content i) # |
Instance details Defined in Text.XML.HaXml.Types Methods showsPrec :: Int -> Content i -> ShowS # show :: Content i -> String # showList :: [Content i] -> ShowS #
Verbatim (Content i) # |
Instance details Defined in Text.XML.HaXml.Verbatim Methods verbatim :: Content i -> String #

type Attribute = (QName, AttValue) #

data AttValue #

Constructors

AttValue [Either String Reference] |

Instances

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

info :: Content t -> t #

## Administrative parts of the document

data Prolog #

Constructors

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

Instances

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

data XMLDecl #

Constructors

XMLDecl VersionInfo (Maybe EncodingDecl) (Maybe SDDecl) |

Instances

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

data Misc #

Constructors

Comment Comment |
PI ProcessingInstruction |

Instances

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

type ProcessingInstruction = (PITarget, String) #

type SDDecl = Bool #

type VersionInfo = String #

type Comment = String #

type PITarget = String #

## The DTD

### content model

data DocTypeDecl #

Constructors

DTD QName (Maybe ExternalID) [MarkupDecl] |

Instances

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

data MarkupDecl #

Constructors

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

Instances

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

data ExtSubset #

Constructors

ExtSubset (Maybe TextDecl) [ExtSubsetDecl] |

Instances

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

data ExtSubsetDecl #

Constructors

ExtMarkupDecl MarkupDecl |
ExtConditionalSect ConditionalSect |

Instances

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

data ElementDecl #

Constructors

ElementDecl QName ContentSpec |

Instances

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

data ContentSpec #

Constructors

EMPTY |
ANY |
Mixed Mixed |
ContentSpec CP |

Instances

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

data CP #

Constructors

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

Instances

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

data Modifier #

Constructors

None | Just One
Query | Zero Or One
Star | Zero Or More
Plus | One Or More

Instances

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

data Mixed #

Constructors

PCDATA |
PCDATAplus [QName] |

Instances

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

### attribute model

data AttListDecl #

Constructors

AttListDecl QName [AttDef] |

Instances

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

data AttDef #

Constructors

AttDef QName AttType DefaultDecl |

Instances

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

data AttType #

Constructors

StringType |
TokenizedType TokenizedType |
EnumeratedType EnumeratedType |

Instances

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

data TokenizedType #

Constructors

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

Instances

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

data EnumeratedType #

Constructors

NotationType NotationType |
Enumeration Enumeration |

Instances

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

type NotationType = [Name] #

type Enumeration = [NmToken] #

data DefaultDecl #

Constructors

REQUIRED |
IMPLIED |
DefaultTo AttValue (Maybe FIXED) |

Instances

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

data FIXED #

Constructors

FIXED |

Instances

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

### conditional sections

data ConditionalSect #

Constructors

IncludeSect IncludeSect |
IgnoreSect IgnoreSect |

Instances

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

type IncludeSect = [ExtSubsetDecl] #

type IgnoreSect = [IgnoreSectContents] #

data Ignore #

Constructors

Ignore |

Instances

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

data IgnoreSectContents #

Constructors

IgnoreSectContents Ignore [(IgnoreSectContents, Ignore)] |

Instances

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

## References

data Reference #

Constructors

RefEntity EntityRef |
RefChar CharRef |

Instances

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

type EntityRef = Name #

type CharRef = Int #

type PEReference = Name #

## Entities

data EntityDecl #

Constructors

EntityGEDecl GEDecl |
EntityPEDecl PEDecl |

Instances

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

data GEDecl #

Constructors

GEDecl Name EntityDef |

Instances

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

data PEDecl #

Constructors

PEDecl Name PEDef |

Instances

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

data EntityDef #

Constructors

DefEntityValue EntityValue |
DefExternalID ExternalID (Maybe NDataDecl) |

Instances

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

data PEDef #

Constructors

PEDefEntityValue EntityValue |
PEDefExternalID ExternalID |

Instances

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

data ExternalID #

Constructors

SYSTEM SystemLiteral |
PUBLIC PubidLiteral SystemLiteral |

Instances

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

newtype NDataDecl #

Constructors

NDATA Name |

Instances

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

data TextDecl #

Constructors

TextDecl (Maybe VersionInfo) EncodingDecl |

Instances

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

data ExtParsedEnt i #

Constructors

ExtParsedEnt (Maybe TextDecl) (Content i) |

Instances

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

data ExtPE #

Constructors

ExtPE (Maybe TextDecl) [ExtSubsetDecl] |

Instances

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

data NotationDecl #

Constructors

NOTATION Name (Either ExternalID PublicID) |

Instances

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

newtype PublicID #

Constructors

PUBLICID PubidLiteral |

Instances

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

newtype EncodingDecl #

Constructors

EncodingDecl String |

Instances

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

data EntityValue #

Constructors

EntityValue [EV] |

Instances

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

data EV #

Constructors

EVString String |
EVRef Reference |

Instances

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

newtype PubidLiteral #

Constructors

PubidLiteral String |

Instances

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

newtype SystemLiteral #

Constructors

SystemLiteral String |

Instances

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

## Namespaces

data QName #

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

Constructors

N Name |
QN Namespace Name |

Instances

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

data Namespace #

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

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

## Basic value types

type Name = String #

type Names = [Name] #

type NmToken = String #

type NmTokens = [NmToken] #

type CharData = String #

type CDSect = CharData #