Portability | portable |
---|---|
Stability | experimental |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
The core data types of XPath. The Type NodeSet is based on the module NavTree which was adapted from HXML (http://www.flightlab.com/~joe/hxml/)
- data Expr
- = GenExpr Op [Expr]
- | PathExpr (Maybe Expr) (Maybe LocationPath)
- | FilterExpr [Expr]
- | VarExpr VarName
- | LiteralExpr Literal
- | NumberExpr XPNumber
- | FctExpr FctName FctArguments
- data Op
- data XPNumber
- data LocationPath = LocPath Path [XStep]
- data Path
- data XStep = Step AxisSpec NodeTest [Expr]
- data AxisSpec
- = Ancestor
- | AncestorOrSelf
- | Attribute
- | Child
- | Descendant
- | DescendantOrSelf
- | Following
- | FollowingSibling
- | Namespace
- | Parent
- | Preceding
- | PrecedingSibling
- | Self
- data NodeTest
- data XPathNode
- = XPNode
- | XPCommentNode
- | XPPINode
- | XPTextNode
- type Name = (NamePrefix, LocalName)
- type NamePrefix = String
- type LocalName = String
- type VarName = Name
- type Literal = String
- type FctName = String
- type FctArguments = [Expr]
- type Context = (ConPos, ConLen, ConNode)
- type ConPos = Int
- type ConLen = Int
- type ConNode = NavXmlTree
- data XPathValue
- type NavXmlTree = NavTree XNode
- type NavXmlTrees = [NavXmlTree]
- type NodeSet = NavXmlTrees
- type XPathFilter = XPathValue -> XPathValue
- type VarTab = [(VarName, XPathValue)]
- type KeyTab = [(QName, String, NavXmlTree)]
- type Env = (VarTab, KeyTab)
- varEnv :: Env
- module Text.XML.HXT.XPath.NavTree
Documentation
Represents expression
GenExpr Op [Expr] | generic expression with an operator and one or more operands |
PathExpr (Maybe Expr) (Maybe LocationPath) | a path expression contains an optional filter-expression or an optional locationpath. one expression is urgently necessary, both are possible |
FilterExpr [Expr] | filter-expression with zero or more predicates |
VarExpr VarName | variable |
LiteralExpr Literal | string |
NumberExpr XPNumber | number |
FctExpr FctName FctArguments | a function with a name and an optional list of arguments |
Represents XPath operators
Represents a floating-point number according the IEEE 754 standard
The standard includes a special Not-a-Number (NaN) value, positive and negative infinity, positive and negative zero.
data LocationPath Source
Represents location path
A location path consists of a sequence of one or more location steps.
Represents location step
A location step consists of an axis, a node-test and zero or more predicates.
Represents XPath axis
Represents XPath node-tests
Represents nodetype-tests
XPNode | all 7 nodetypes (root, element, attribute, namespace, pi, comment, text) |
XPCommentNode | comment-nodes |
XPPINode | processing-instruction-nodes |
XPTextNode | text-nodes: cdata, character data |
type Name = (NamePrefix, LocalName)Source
type NamePrefix = StringSource
type FctArguments = [Expr]Source
Function arguments
type ConNode = NavXmlTreeSource
Context node
data XPathValue Source
Represents XPath results
type NavXmlTree = NavTree XNodeSource
Node of navigable tree representation
type NavXmlTrees = [NavXmlTree]Source
List of nodes of navigable tree representation
type NodeSet = NavXmlTreesSource
Type synonym for a list of navigable tree representation
type XPathFilter = XPathValue -> XPathValueSource
A functions that takes a XPath result and returns a XPath result
type VarTab = [(VarName, XPathValue)]Source
XPath environment
All variables are stored in the environment, each variable name is bound to a value.
type KeyTab = [(QName, String, NavXmlTree)]Source
module Text.XML.HXT.XPath.NavTree