Copyright | Copyright (C) 2008 Uwe Schmidt |
---|---|
License | MIT |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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.
- 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
- isNotInNodeList :: NavXmlTree -> [NavXmlTree] -> Bool
- getVarTab :: Env -> VarTab
- getKeyTab :: Env -> KeyTab
Documentation
type XFct = Context -> Env -> [XPathValue] -> XPathValue Source
Type signature for all functions which can be used in the XPath module.
evalFct :: FctName -> Env -> Context -> [XPathValue] -> XPathValue Source
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.
- returns : the function value as
XPathValue
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
getConvFct :: XPathValue -> Maybe XFct Source
Returns the conversion function for the XPath results: string, boolean and number A nodeset can not be converted.
stringValue :: NavXmlTree -> XPathValue Source
Returns the string-value of a node, the value of a namespace node is not supported
isNotInNodeList :: NavXmlTree -> [NavXmlTree] -> Bool Source
Check whether a node is not a part of a node list. Needed to implement matching & testing in xslt.