2005-04-03 04:14:15

4XPath initialization and principal functions

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

4XPath-specific extension functions

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Extension functions are implemented by a module, such as this one, that defines an ExtFunctions global dictionary that maps (namespace, local-name) string tuples to a corresponding Python function. The function must take a Context object as the first argument, and any additional arguments accepted will correspond to the arguments passed in. See other API docs to see how to make use of modules that contain ExtFunctions.

The context of an XPath expression

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

The context of an XPath expression

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

The implementation of the XPath object type conversions. WWW: http://4suite.org/XPATH e-mail: support@4suite.org

Copyright (c) 2000-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

The implementation of the core functions from XPath 1.0.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

4XPath-specific math extension functions

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

XPath error codes and messages

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A parsed token that represents an abbreviated absolute location path.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A parsed token that represents a abbreviated relative location path.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A Parsed Token that represents a absolute location path in the parsed tree. WWW: http://4suite.org/XPATH e-mail: support@4suite.org

Copyright (c) 2000-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

A parsed token that represents an axis specifier.

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

The implementation of parsed XPath expression tokens.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A parsed token that represents a node test.

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A parsed token that represents a predicate list.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A parsed token that represents a relative location path in the parsed result tree.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A parsed token that represents a step.

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Mappings between Python types and standard XPath object types

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

General utilities for XPath applications

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

4XPath command-line application

The exception raised when an error is encountered during the parsing or compilation of an XPath expression.

1
2

The exception raised when an error is encountered during the parsing or evaluation of an XPath expression.

202
204
203
201
1
10
102
101
100
200

Base class for exceptions specific to XPath processing

Given an XPath expression as a string, returns an object that allows an evaluation engine to operate on the expression efficiently. This "compiled" expression object can be passed to the Evaluate function instead of a string, in order to shorten the amount of time needed to evaluate the expression.

Evaluates the given XPath expression.

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).

NormalizeNode is used to prepare a DOM for XPath evaluation.

1. Convert CDATA Sections to Text Nodes. 2. Normalize all text nodes (adjacent nodes are merged into the first one).

Designed to be the most simple/brain-dead interface to using XPath Usually invoked through Node objects using: node.xpath(expr[, explicitNss])

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
'http://xmlns.4suite.org/ext'
13
13
['XPATH_NAMESPACE_NODE', 'NAMESPACE_NODE', 'FT_EXT_NAMESPACE', 'XPathException', 'CompiletimeException', 'RuntimeException', 'g_parser', 'parser', 'Context', 'Compile', 'Evaluate', 'SimpleEvaluate', 'NormalizeNode']