HaXml-1.25.4: 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 # |
Methods fmap :: (a -> b) -> Document a -> Document b # (<$) :: a -> Document b -> Document a #
Eq (Document i) # |
Methods (==) :: Document i -> Document i -> Bool # (/=) :: Document i -> Document i -> Bool #
Show i => Show (Document i) # |
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 # |
Methods fmap :: (a -> b) -> Element a -> Element b # (<$) :: a -> Element b -> Element a #
Eq (Element i) # |
Methods (==) :: Element i -> Element i -> Bool # (/=) :: Element i -> Element i -> Bool #
Show i => Show (Element i) # |
Methods showsPrec :: Int -> Element i -> ShowS # show :: Element i -> String # showList :: [Element i] -> ShowS #
Verbatim (Element i) # |
Methods verbatim :: Element i -> String #

data ElemTag #

Constructors

ElemTag QName [Attribute] |

Instances

Eq ElemTag # |
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 # |
Methods fmap :: (a -> b) -> Content a -> Content b # (<$) :: a -> Content b -> Content a #
Eq (Content i) # |
Methods (==) :: Content i -> Content i -> Bool # (/=) :: Content i -> Content i -> Bool #
Show i => Show (Content i) # |
Methods showsPrec :: Int -> Content i -> ShowS # show :: Content i -> String # showList :: [Content i] -> ShowS #
Verbatim (Content i) # |
Methods verbatim :: Content i -> String #

type Attribute = (QName, AttValue) #

data AttValue #

Constructors

AttValue [Either String Reference] |

Instances

Eq AttValue # |
Methods (==) :: AttValue -> AttValue -> Bool # (/=) :: AttValue -> AttValue -> Bool #
Show AttValue # |
Methods showsPrec :: Int -> AttValue -> ShowS # show :: AttValue -> String # showList :: [AttValue] -> ShowS #
Verbatim AttValue # |
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 # |
Methods (==) :: Prolog -> Prolog -> Bool # (/=) :: Prolog -> Prolog -> Bool #
Show Prolog # |
Methods showsPrec :: Int -> Prolog -> ShowS # show :: Prolog -> String # showList :: [Prolog] -> ShowS #

data XMLDecl #

Constructors

XMLDecl VersionInfo (Maybe EncodingDecl) (Maybe SDDecl) |

Instances

Eq XMLDecl # |
Methods (==) :: XMLDecl -> XMLDecl -> Bool # (/=) :: XMLDecl -> XMLDecl -> Bool #
Show XMLDecl # |
Methods showsPrec :: Int -> XMLDecl -> ShowS # show :: XMLDecl -> String # showList :: [XMLDecl] -> ShowS #

data Misc #

Constructors

Comment Comment |
PI ProcessingInstruction |

Instances

Eq Misc # |
Methods (==) :: Misc -> Misc -> Bool # (/=) :: Misc -> Misc -> Bool #
Show Misc # |
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 # |
Methods (==) :: DocTypeDecl -> DocTypeDecl -> Bool # (/=) :: DocTypeDecl -> DocTypeDecl -> Bool #
Show DocTypeDecl # |
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 # |
Methods (==) :: MarkupDecl -> MarkupDecl -> Bool # (/=) :: MarkupDecl -> MarkupDecl -> Bool #
Show MarkupDecl # |
Methods showsPrec :: Int -> MarkupDecl -> ShowS # show :: MarkupDecl -> String # showList :: [MarkupDecl] -> ShowS #

data ExtSubset #

Constructors

ExtSubset (Maybe TextDecl) [ExtSubsetDecl] |

Instances

Eq ExtSubset # |
Methods (==) :: ExtSubset -> ExtSubset -> Bool # (/=) :: ExtSubset -> ExtSubset -> Bool #
Show ExtSubset # |
Methods showsPrec :: Int -> ExtSubset -> ShowS # show :: ExtSubset -> String # showList :: [ExtSubset] -> ShowS #

data ExtSubsetDecl #

Constructors

ExtMarkupDecl MarkupDecl |
ExtConditionalSect ConditionalSect |

Instances

Eq ExtSubsetDecl # |
Methods (==) :: ExtSubsetDecl -> ExtSubsetDecl -> Bool # (/=) :: ExtSubsetDecl -> ExtSubsetDecl -> Bool #
Show ExtSubsetDecl # |
Methods showsPrec :: Int -> ExtSubsetDecl -> ShowS # show :: ExtSubsetDecl -> String # showList :: [ExtSubsetDecl] -> ShowS #

data ElementDecl #

Constructors

ElementDecl QName ContentSpec |

Instances

Eq ElementDecl # |
Methods (==) :: ElementDecl -> ElementDecl -> Bool # (/=) :: ElementDecl -> ElementDecl -> Bool #
Show ElementDecl # |
Methods showsPrec :: Int -> ElementDecl -> ShowS # show :: ElementDecl -> String # showList :: [ElementDecl] -> ShowS #

data ContentSpec #

Constructors

EMPTY |
ANY |
Mixed Mixed |
ContentSpec CP |

Instances

Eq ContentSpec # |
Methods (==) :: ContentSpec -> ContentSpec -> Bool # (/=) :: ContentSpec -> ContentSpec -> Bool #
Show ContentSpec # |
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 # |
Methods (==) :: CP -> CP -> Bool # (/=) :: CP -> CP -> Bool #
Show CP # |
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 # |
Methods (==) :: Modifier -> Modifier -> Bool # (/=) :: Modifier -> Modifier -> Bool #
Show Modifier # |
Methods showsPrec :: Int -> Modifier -> ShowS # show :: Modifier -> String # showList :: [Modifier] -> ShowS #

data Mixed #

Constructors

PCDATA |
PCDATAplus [QName] |

Instances

Eq Mixed # |
Methods (==) :: Mixed -> Mixed -> Bool # (/=) :: Mixed -> Mixed -> Bool #
Show Mixed # |
Methods showsPrec :: Int -> Mixed -> ShowS # show :: Mixed -> String # showList :: [Mixed] -> ShowS #

### attribute model

data AttListDecl #

Constructors

AttListDecl QName [AttDef] |

Instances

Eq AttListDecl # |
Methods (==) :: AttListDecl -> AttListDecl -> Bool # (/=) :: AttListDecl -> AttListDecl -> Bool #
Show AttListDecl # |
Methods showsPrec :: Int -> AttListDecl -> ShowS # show :: AttListDecl -> String # showList :: [AttListDecl] -> ShowS #

data AttDef #

Constructors

AttDef QName AttType DefaultDecl |

Instances

Eq AttDef # |
Methods (==) :: AttDef -> AttDef -> Bool # (/=) :: AttDef -> AttDef -> Bool #
Show AttDef # |
Methods showsPrec :: Int -> AttDef -> ShowS # show :: AttDef -> String # showList :: [AttDef] -> ShowS #

data AttType #

Constructors

StringType |
TokenizedType TokenizedType |
EnumeratedType EnumeratedType |

Instances

Eq AttType # |
Methods (==) :: AttType -> AttType -> Bool # (/=) :: AttType -> AttType -> Bool #
Show AttType # |
Methods showsPrec :: Int -> AttType -> ShowS # show :: AttType -> String # showList :: [AttType] -> ShowS #

data TokenizedType #

Constructors

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

Instances

Eq TokenizedType # |
Methods (==) :: TokenizedType -> TokenizedType -> Bool # (/=) :: TokenizedType -> TokenizedType -> Bool #
Show TokenizedType # |
Methods showsPrec :: Int -> TokenizedType -> ShowS # show :: TokenizedType -> String # showList :: [TokenizedType] -> ShowS #

data EnumeratedType #

Constructors

NotationType NotationType |
Enumeration Enumeration |

Instances

Eq EnumeratedType # |
Methods (==) :: EnumeratedType -> EnumeratedType -> Bool # (/=) :: EnumeratedType -> EnumeratedType -> Bool #
Show EnumeratedType # |
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 # |
Methods (==) :: DefaultDecl -> DefaultDecl -> Bool # (/=) :: DefaultDecl -> DefaultDecl -> Bool #
Show DefaultDecl # |
Methods showsPrec :: Int -> DefaultDecl -> ShowS # show :: DefaultDecl -> String # showList :: [DefaultDecl] -> ShowS #

data FIXED #

Constructors

FIXED |

Instances

Eq FIXED # |
Methods (==) :: FIXED -> FIXED -> Bool # (/=) :: FIXED -> FIXED -> Bool #
Show FIXED # |
Methods showsPrec :: Int -> FIXED -> ShowS # show :: FIXED -> String # showList :: [FIXED] -> ShowS #

### conditional sections

data ConditionalSect #

Constructors

IncludeSect IncludeSect |
IgnoreSect IgnoreSect |

Instances

Eq ConditionalSect # |
Methods (==) :: ConditionalSect -> ConditionalSect -> Bool # (/=) :: ConditionalSect -> ConditionalSect -> Bool #
Show ConditionalSect # |
Methods showsPrec :: Int -> ConditionalSect -> ShowS # show :: ConditionalSect -> String # showList :: [ConditionalSect] -> ShowS #

type IncludeSect = [ExtSubsetDecl] #

type IgnoreSect = [IgnoreSectContents] #

data Ignore #

Constructors

Ignore |

Instances

Eq Ignore # |
Methods (==) :: Ignore -> Ignore -> Bool # (/=) :: Ignore -> Ignore -> Bool #
Show Ignore # |
Methods showsPrec :: Int -> Ignore -> ShowS # show :: Ignore -> String # showList :: [Ignore] -> ShowS #

data IgnoreSectContents #

Constructors

IgnoreSectContents Ignore [(IgnoreSectContents, Ignore)] |

Instances

Eq IgnoreSectContents # |
Methods (==) :: IgnoreSectContents -> IgnoreSectContents -> Bool # (/=) :: IgnoreSectContents -> IgnoreSectContents -> Bool #
Show IgnoreSectContents # |
Methods showsPrec :: Int -> IgnoreSectContents -> ShowS # show :: IgnoreSectContents -> String # showList :: [IgnoreSectContents] -> ShowS #

## References

data Reference #

Constructors

RefEntity EntityRef |
RefChar CharRef |

Instances

Eq Reference # |
Methods (==) :: Reference -> Reference -> Bool # (/=) :: Reference -> Reference -> Bool #
Show Reference # |
Methods showsPrec :: Int -> Reference -> ShowS # show :: Reference -> String # showList :: [Reference] -> ShowS #
Verbatim Reference # |
Methods verbatim :: Reference -> String #

type EntityRef = Name #

type CharRef = Int #

type PEReference = Name #

## Entities

data EntityDecl #

Constructors

EntityGEDecl GEDecl |
EntityPEDecl PEDecl |

Instances

Eq EntityDecl # |
Methods (==) :: EntityDecl -> EntityDecl -> Bool # (/=) :: EntityDecl -> EntityDecl -> Bool #
Show EntityDecl # |
Methods showsPrec :: Int -> EntityDecl -> ShowS # show :: EntityDecl -> String # showList :: [EntityDecl] -> ShowS #

data GEDecl #

Constructors

GEDecl Name EntityDef |

Instances

Eq GEDecl # |
Methods (==) :: GEDecl -> GEDecl -> Bool # (/=) :: GEDecl -> GEDecl -> Bool #
Show GEDecl # |
Methods showsPrec :: Int -> GEDecl -> ShowS # show :: GEDecl -> String # showList :: [GEDecl] -> ShowS #

data PEDecl #

Constructors

PEDecl Name PEDef |

Instances

Eq PEDecl # |
Methods (==) :: PEDecl -> PEDecl -> Bool # (/=) :: PEDecl -> PEDecl -> Bool #
Show PEDecl # |
Methods showsPrec :: Int -> PEDecl -> ShowS # show :: PEDecl -> String # showList :: [PEDecl] -> ShowS #

data EntityDef #

Constructors

DefEntityValue EntityValue |
DefExternalID ExternalID (Maybe NDataDecl) |

Instances

Eq EntityDef # |
Methods (==) :: EntityDef -> EntityDef -> Bool # (/=) :: EntityDef -> EntityDef -> Bool #
Show EntityDef # |
Methods showsPrec :: Int -> EntityDef -> ShowS # show :: EntityDef -> String # showList :: [EntityDef] -> ShowS #

data PEDef #

Constructors

PEDefEntityValue EntityValue |
PEDefExternalID ExternalID |

Instances

Eq PEDef # |
Methods (==) :: PEDef -> PEDef -> Bool # (/=) :: PEDef -> PEDef -> Bool #
Show PEDef # |
Methods showsPrec :: Int -> PEDef -> ShowS # show :: PEDef -> String # showList :: [PEDef] -> ShowS #

data ExternalID #

Constructors

SYSTEM SystemLiteral |
PUBLIC PubidLiteral SystemLiteral |

Instances

Eq ExternalID # |
Methods (==) :: ExternalID -> ExternalID -> Bool # (/=) :: ExternalID -> ExternalID -> Bool #
Show ExternalID # |
Methods showsPrec :: Int -> ExternalID -> ShowS # show :: ExternalID -> String # showList :: [ExternalID] -> ShowS #

newtype NDataDecl #

Constructors

NDATA Name |

Instances

Eq NDataDecl # |
Methods (==) :: NDataDecl -> NDataDecl -> Bool # (/=) :: NDataDecl -> NDataDecl -> Bool #
Show NDataDecl # |
Methods showsPrec :: Int -> NDataDecl -> ShowS # show :: NDataDecl -> String # showList :: [NDataDecl] -> ShowS #

data TextDecl #

Constructors

TextDecl (Maybe VersionInfo) EncodingDecl |

Instances

Eq TextDecl # |
Methods (==) :: TextDecl -> TextDecl -> Bool # (/=) :: TextDecl -> TextDecl -> Bool #
Show TextDecl # |
Methods showsPrec :: Int -> TextDecl -> ShowS # show :: TextDecl -> String # showList :: [TextDecl] -> ShowS #

data ExtParsedEnt i #

Constructors

ExtParsedEnt (Maybe TextDecl) (Content i) |

Instances

Eq (ExtParsedEnt i) # |
Methods (==) :: ExtParsedEnt i -> ExtParsedEnt i -> Bool # (/=) :: ExtParsedEnt i -> ExtParsedEnt i -> Bool #
Show i => Show (ExtParsedEnt i) # |
Methods showsPrec :: Int -> ExtParsedEnt i -> ShowS # show :: ExtParsedEnt i -> String # showList :: [ExtParsedEnt i] -> ShowS #

data ExtPE #

Constructors

ExtPE (Maybe TextDecl) [ExtSubsetDecl] |

Instances

Eq ExtPE # |
Methods (==) :: ExtPE -> ExtPE -> Bool # (/=) :: ExtPE -> ExtPE -> Bool #
Show ExtPE # |
Methods showsPrec :: Int -> ExtPE -> ShowS # show :: ExtPE -> String # showList :: [ExtPE] -> ShowS #

data NotationDecl #

Constructors

NOTATION Name (Either ExternalID PublicID) |

Instances

Eq NotationDecl # |
Methods (==) :: NotationDecl -> NotationDecl -> Bool # (/=) :: NotationDecl -> NotationDecl -> Bool #
Show NotationDecl # |
Methods showsPrec :: Int -> NotationDecl -> ShowS # show :: NotationDecl -> String # showList :: [NotationDecl] -> ShowS #

newtype PublicID #

Constructors

PUBLICID PubidLiteral |

Instances

Eq PublicID # |
Methods (==) :: PublicID -> PublicID -> Bool # (/=) :: PublicID -> PublicID -> Bool #
Show PublicID # |
Methods showsPrec :: Int -> PublicID -> ShowS # show :: PublicID -> String # showList :: [PublicID] -> ShowS #

newtype EncodingDecl #

Constructors

EncodingDecl String |

Instances

Eq EncodingDecl # |
Methods (==) :: EncodingDecl -> EncodingDecl -> Bool # (/=) :: EncodingDecl -> EncodingDecl -> Bool #
Show EncodingDecl # |
Methods showsPrec :: Int -> EncodingDecl -> ShowS # show :: EncodingDecl -> String # showList :: [EncodingDecl] -> ShowS #

data EntityValue #

Constructors

EntityValue [EV] |

Instances

Eq EntityValue # |
Methods (==) :: EntityValue -> EntityValue -> Bool # (/=) :: EntityValue -> EntityValue -> Bool #
Show EntityValue # |
Methods showsPrec :: Int -> EntityValue -> ShowS # show :: EntityValue -> String # showList :: [EntityValue] -> ShowS #

data EV #

Constructors

EVString String |
EVRef Reference |

Instances

Eq EV # |
Methods (==) :: EV -> EV -> Bool # (/=) :: EV -> EV -> Bool #
Show EV # |
Methods showsPrec :: Int -> EV -> ShowS # show :: EV -> String # showList :: [EV] -> ShowS #

newtype PubidLiteral #

Constructors

PubidLiteral String |

Instances

Eq PubidLiteral # |
Methods (==) :: PubidLiteral -> PubidLiteral -> Bool # (/=) :: PubidLiteral -> PubidLiteral -> Bool #
Show PubidLiteral # |
Methods showsPrec :: Int -> PubidLiteral -> ShowS # show :: PubidLiteral -> String # showList :: [PubidLiteral] -> ShowS #

newtype SystemLiteral #

Constructors

SystemLiteral String |

Instances

Eq SystemLiteral # |
Methods (==) :: SystemLiteral -> SystemLiteral -> Bool # (/=) :: SystemLiteral -> SystemLiteral -> Bool #
Show SystemLiteral # |
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 # |
Methods (==) :: QName -> QName -> Bool # (/=) :: QName -> QName -> Bool #
Ord QName # |
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 # |
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 # |
Methods (==) :: Namespace -> Namespace -> Bool # (/=) :: Namespace -> Namespace -> Bool #
Show Namespace # |
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 #