Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/
Functions:
|
Two arguments are required: the expression (as a string or compiled expression object), and a context. The context can be given as a Domlette node via the 'contextNode' named argument, or can be given as an Ft.Xml.XPath.Context.Context object via the 'context' named argument. If namespace bindings or variable bindings are needed, use a Context object. If extension functions are needed, either use a Context object, or set the EXTMODULES environment variable to be a ':'-separated list of names of Python modules that implement extension functions. The return value will be one of the following: node-set: list of Domlette node objects (xml.dom.Node based); string: Unicode string type; number: float type; boolean: Ft.Lib.boolean C extension object; or a non-XPath object (i.e. as returned by an extension function).
Returns a 2-tuple consisting of the namespace URI and local name.
1. Convert CDATA Sections to Text Nodes. 2. Normalize all text nodes (adjacent nodes are merged into the first one).
expr - XPath expression in string or compiled form node - the node to be used as core of the context for evaluating the XPath explicitNss - (optional) any additional or overriding namespace mappings in the form of a dictionary of prefix: namespace the base namespace mappings are taken from in-scope declarations on the given node. This explicit dictionary is suprimposed on the base mappings