hxt-7.3: A collection of tools for processing XML with Haskell.ContentsIndex
Text.XML.HXT.XPath.XPathFct
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] -> XPathValue
Type signature for all functions which can be used in the XPath module.
evalFct :: FctName -> Env -> Context -> [XPathValue] -> XPathValue

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]

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

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