hxt-8.0.0: A collection of tools for processing XML with Haskell.Source codeContentsIndex
Text.XML.HXT.XPath.XPathFct
Portabilityportable
Stabilityexperimental
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Description
The module contains the core-functions of the XPath function library. All functions are implemented as XFct. Each XFct contains the evaluation context, the variable environment and the function arguments.
Synopsis
type XFct = Context -> Env -> [XPathValue] -> XPathValue
evalFct :: FctName -> Env -> Context -> [XPathValue] -> XPathValue
toXValue :: XFct -> Context -> Env -> [XPathValue] -> [XPathValue]
xnumber :: XFct
xboolean :: XFct
xstring :: XFct
getConvFct :: XPathValue -> Maybe XFct
stringValue :: NavXmlTree -> XPathValue
remDups :: XPathFilter
isNotInNodeList :: NavXmlTree -> [NavXmlTree] -> Bool
createDocumentOrder :: XPathFilter
createDocumentOrderReverse :: XPathFilter
getVarTab :: Env -> VarTab
getKeyTab :: Env -> KeyTab
Documentation
type XFct = Context -> Env -> [XPathValue] -> XPathValueSource
Type signature for all functions which can be used in the XPath module.
evalFct :: FctName -> Env -> Context -> [XPathValue] -> XPathValueSource

Evaluates a function. Calculation of the function value is done by looking up the function name in the function table, check the number of arguments and calculate the funtion, if no argument evaluation returns an error.

toXValue :: XFct -> Context -> Env -> [XPathValue] -> [XPathValue]Source

Converts a list of different XPathValue types in a list of one XPathValue type.

  • 1.parameter fct : the conversion function
xnumber :: XFctSource
number number(object?): converts its argument to a number
xboolean :: XFctSource
boolean boolean(object): converts its argument to a boolean value
xstring :: XFctSource
string string(object?): converts an object to a string
getConvFct :: XPathValue -> Maybe XFctSource
Returns the conversion function for the XPath results: string, boolean and number A nodeset can not be converted.
stringValue :: NavXmlTree -> XPathValueSource
Returns the string-value of a node, the value of a namespace node is not supported
remDups :: XPathFilterSource
Filter for removing identical fragment trees in a nodeset
isNotInNodeList :: NavXmlTree -> [NavXmlTree] -> BoolSource
Check whether a node is not a part of a node list. Needed to implement matching & testing in xslt.
createDocumentOrder :: XPathFilterSource
Filter for ordering a list of Nodes in document order
createDocumentOrderReverse :: XPathFilterSource
Filter for ordering a list of Nodes in reverse document order
getVarTab :: Env -> VarTabSource
Returns the table of variables from the environment
getKeyTab :: Env -> KeyTabSource
Returns the table of keys, needed by xslt, from the environment
Produced by Haddock version 2.3.0