4Suite™ API Documentation

# ► Module Ft.Xml.XPointer

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

Classes: XPtrException |  |  |  | Functions: SelectNode, SelectUri

## Modules

MessageSource | XPointer error codes and messages
ParsedNodeTest | A Parsed Token that represents a node test. WWW: http://4suite.org/XPATH e-mail: support@4suite.org
ParsedXPointer | A Parsed Token that represents a list of XPointers WWW: http://4suite.org/XPointer e-mail: support@4suite.org
XPointer | A Parsed Token that represents a list of XPointers WWW: http://4suite.org/XPointer e-mail: support@4suite.org
XPointerParserc |
XPtrContext |
XPtrExprParserc |
XPtrFunctions |
XPtrPart | A Parsed Token that represents a list of XPointers WWW: http://4suite.org/XPointer e-mail: support@4suite.org

## Classes

class XPtrException(Ft.FtException)

### Methods

__init__(self, errorCode, *args)

### Methods inherited from class Ft.FtException

__getattr__, __repr__, __str__

### Methods inherited from class exceptions.Exception

__getitem__

### Fields

INTERNAL_ERROR = 1
RESOURCE_ERROR = 3
SUB_RESOURCE_ERROR = 4
SYNTAX_ERROR = 2

## Functions

SelectNode(doc, xpointer, nss=None, contextNode=None)
Given a valid DOM node, evaluates an XPointer against it.
contextNode, if given, is the original XPointer context node
(e.g., from the referring document, if any; accessible in the
XPointer via the 'here' function).
nss is a set of explicit namespace mappings for use when evaluating
the XPointer (e.g., when the xmlns scheme isn't being used).
SelectUri(uri, contextNode=None, nss=None)
Parses the document with the given URI, and returns the node corresponding to the XPointer given in the fragment of the URI.
uri must be an absolute URI reference. If it doesn't have a
fragment, returns the root node.
contextNode, if given, is the original XPointer context node
(e.g., from the referring document, if any; accessible in the
XPointer via the 'here' function).
nss is a set of explicit namespace mappings for use when evaluating
the XPointer (e.g., when the xmlns scheme isn't being used).