|
Text.XML.HXT.XPath.XPathDataTypes |
|
|
Description |
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/)
|
|
Synopsis |
|
|
|
Documentation |
|
data Expr |
Represents expression
| Constructors | 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
|
| Instances | |
|
|
data Op |
Represents XPath operators
| Constructors | Or | | And | | Eq | | NEq | | Less | | Greater | | LessEq | | GreaterEq | | Plus | | Minus | | Div | | Mod | | Mult | | Unary | | Union | |
| Instances | |
|
|
data XPNumber |
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.
| Constructors | Float Float | floating-point number
| NaN | not-a-number
| NegInf | negative infinity
| Neg0 | negative zero
| Pos0 | positive zero
| PosInf | positive infinity
|
| Instances | |
|
|
data LocationPath |
Represents location path
A location path consists of a sequence of one or more location steps.
| Constructors | | Instances | |
|
|
data Path |
A location path is either a relative or an absolute path.
| Constructors | | Instances | |
|
|
data XStep |
Represents location step
A location step consists of an axis, a node-test and zero or more predicates.
| Constructors | | Instances | |
|
|
data AxisSpec |
Represents XPath axis
| Constructors | Ancestor | | AncestorOrSelf | | Attribute | | Child | | Descendant | | DescendantOrSelf | | Following | | FollowingSibling | | Namespace | | Parent | | Preceding | | PrecedingSibling | | Self | |
| Instances | |
|
|
data NodeTest |
Represents XPath node-tests
| Constructors | NameTest QName | name-test
| PI String | processing-instruction-test with a literal argument
| TypeTest XPathNode | all nodetype-tests
|
| Instances | |
|
|
data XPathNode |
Represents nodetype-tests
| Constructors | XPNode | all 7 nodetypes
(root, element, attribute, namespace, pi, comment, text)
| XPCommentNode | comment-nodes
| XPPINode | processing-instruction-nodes
| XPTextNode | text-nodes: cdata, character data
|
| Instances | |
|
|
type Name = (NamePrefix, LocalName) |
|
type NamePrefix = String |
|
type LocalName = String |
|
type VarName = Name |
Variable name
|
|
type Literal = String |
a string
|
|
type FctName = String |
Function name
|
|
type FctArguments = [Expr] |
Function arguments
|
|
type Context = (ConPos, ConLen, ConNode) |
Evaluation context
|
|
type ConPos = Int |
Context position
|
|
type ConLen = Int |
Context length
|
|
type ConNode = NavXmlTree |
Context node
|
|
data XPathValue |
Represents XPath results
| Constructors | XPVNode NodeSet | node-set
| XPVBool Bool | boolean value
| XPVNumber XPNumber | number according the IEEE 754 standard
| XPVString String | string value
| XPVError String | error message with text
|
| Instances | |
|
|
type NavXmlTree = NavTree XNode |
Node of navigable tree representation
|
|
type NavXmlTrees = [NavXmlTree] |
List of nodes of navigable tree representation
|
|
type NodeSet = NavXmlTrees |
Type synonym for a list of navigable tree representation
|
|
type XPathFilter = XPathValue -> XPathValue |
A functions that takes a XPath result and returns a XPath result
|
|
type VarTab = [(VarName, XPathValue)] |
XPath environment
All variables are stored in the environment,
each variable name is bound to a value.
|
|
type KeyTab = [(QName, String, NavXmlTree)] |
|
type Env = (VarTab, KeyTab) |
|
varEnv :: Env |
|
module Text.XML.HXT.XPath.NavTree |
|
Produced by Haddock version 0.8 |