hxt-8.1.0: A collection of tools for processing XML with Haskell.Source codeContentsIndex
Text.XML.HXT.DOM.TypeDefs
Portabilityportable
Stabilitystable
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Description
The core data types of the HXT DOM.
Synopsis
module Data.AssocList
type XmlTree = NTree XNode
type XmlTrees = NTrees XNode
data XNode
= XText String
| XCharRef Int
| XEntityRef String
| XCmt String
| XCdata String
| XPi QName XmlTrees
| XTag QName XmlTrees
| XDTD DTDElem Attributes
| XAttr QName
| XError Int String
data DTDElem
= DOCTYPE
| ELEMENT
| CONTENT
| ATTLIST
| ENTITY
| PENTITY
| NOTATION
| CONDSECT
| NAME
| PEREF
type Attributes = AssocList String String
type NsEnv = AssocList String String
c_ok :: Int
c_warn :: Int
c_err :: Int
c_fatal :: Int
data XmlNodeSet = XNS {
thisNode :: Bool
attrNodes :: [QName]
childNodes :: ChildNodes
}
type ChildNodes = [(Int, XmlNodeSet)]
module Text.XML.HXT.DOM.QualifiedName
Documentation
module Data.AssocList
type XmlTree = NTree XNodeSource
Node of xml tree representation
type XmlTrees = NTrees XNodeSource
List of nodes of xml tree representation
data XNode Source
Represents elements
Constructors
XText Stringordinary text (leaf)
XCharRef Intcharacter reference (leaf)
XEntityRef Stringentity reference (leaf)
XCmt Stringcomment (leaf)
XCdata StringCDATA section (leaf)
XPi QName XmlTreesProcessing Instr with qualified name (leaf) with list of attributes. If tag name is xml, attributs are "version", "encoding", "standalone", else attribute list is empty, content is a text child node
XTag QName XmlTreestag with qualified name and list of attributes (inner node or leaf)
XDTD DTDElem AttributesDTD element with assoc list for dtd element features
XAttr QNameattribute with qualified name, the attribute value is stored in children
XError Int Stringerror message with level and text
show/hide Instances
data DTDElem Source
Represents a DTD element
Constructors
DOCTYPEattr: name, system, public, XDTD elems as children
ELEMENT

attr: name, kind

name: element name

kind: "EMPTY" | "ANY" | "#PCDATA" | children | mixed

CONTENT

element content

attr: kind, modifier

modifier: "" | "?" | "*" | "+"

kind: seq | choice

ATTLIST

attributes: name - name of element

value - name of attribute

type: "CDATA" | "ID" | "IDREF" | "IDREFS" | "ENTITY" | "ENTITIES" |

"NMTOKEN" | "NMTOKENS" |"NOTATION" | "ENUMTYPE"

kind: "IMPLIED" | "DEFAULT"

ENTITYfor entity declarations
PENTITYfor parameter entity declarations
NOTATIONfor notations
CONDSECT

for INCLUDEs, IGNOREs and peRefs: attr: type

type = INCLUDE, IGNORE or %...;

NAME

attr: name

for lists of names in notation types or nmtokens in enumeration types

PEREFfor Parameter Entity References in DTDs
show/hide Instances
type Attributes = AssocList String StringSource

Attribute list

used for storing option lists and features of DTD parts

type NsEnv = AssocList String StringSource
Type for the namespace association list, used when propagating namespaces by modifying the QName values in a tree
c_ok :: IntSource
no error, everything is ok
c_warn :: IntSource
Error level for XError, type warning
c_err :: IntSource
Error level for XError, type error
c_fatal :: IntSource
Error level for XError, type fatal error
data XmlNodeSet Source

data type for representing a set of nodes as a tree structure

this structure is e.g. used to repesent the result of an XPath query such that the selected nodes can be processed or selected later in processing a document tree

Constructors
XNS
thisNode :: Boolis this node part of the set ?
attrNodes :: [QName]the set of attribute nodes
childNodes :: ChildNodesthe set of child nodes, a list of pairs of index and node set
show/hide Instances
type ChildNodes = [(Int, XmlNodeSet)]Source
module Text.XML.HXT.DOM.QualifiedName
Produced by Haddock version 2.3.0