xpath.ExternalFunctions

The xpath.ExternalFunctions class provides a function extension mechanism and represents a collection of valid, pre-analyzed external function objects. It can be instantiated with the xpath.ExternalFunctions.create() classmethod. Set on the CompileOptions, an xpath.ExternalFunctions object can be used by more than one xpath, xquery or xslt expression.

class xpath.ExternalFunctions

Class methods

classmethod xpath.ExternalFunctions.create(type cls, Session session, *fcts, dict ns_map=None, Schema schema=None)

Takes one or more xpath.ExternalFunctionObject as input and returns a new xpath.ExternalFunctions object. This involves pre-processesing of the function signatures: syntax checking, resolving of namespace prefixes and schema type resolution. If the ns_map or the schema parameter is None, then the default built-in values are used from XPath specification. In case of invalid signature syntax, unknown prefix or unknown type the xpath.ExternalFunctions is None and the xml.ErrorLog contains the error(s).

Returns: (xpath.ExternalFunctions, xml.ErrorLog)

Special methods

__eq__, __ge__, __gt__, __le__, __lt__, __ne__