4XPointer API

# 4XPointer API

4XPointer
XPointer
API
Application Programming Interface for 4XPointer.

# Usage

4XPointer provides functions that can be called with a URI to extract the relevant subset of the document at the base URI. The URI must conform to the XPointer 1.0 Candidate Recommendation, with the exception that 4XPointer does not yet support points and ranges. Specifically, any XPointer operation involving points and ranges will return an empty location set.

# API

Ft.XPointer
The 4XPointer module
SelectUri
Returns the complete DOM node that results from selecting gainst a URI with an XPointer fragment.
uri
string conforming to the XPointer spec The URI (including fragment) to be selected
contextNode
Object with the interface of Ft.Lib.pDomlette.Node The node to be taken as context. Basically used in the here() and origin() functions. If None, there is no given context and all operations must be absolute. The default is None.
reader
Object with the interface of xml.dom.ext.reader.Reader The object used to create a DOM representation from text. Defaults according to the BETA_DOMLETTE environment variable.
A DOM node. The precise type (4DOM, pDomlette, cDomlette, DbDom, etc.) depends on the reader passed in. The node which was selected by the XPointer expression.
Ft.XPointer.XPtrException Raised when an invalid URI according to XPointer is provided.
xml.sax.saxlib.SAXException Raised if there is a low-level SAX error.
xml.sax.saxlib.SAXException Raised if the XML parser reports a well-formedness or validity error.
SelectNode
Returns the complete DOM node that results from selecting against a DOM document and an XPointer fragment.
doc
Object with the interface of Ft.Lib.pDomlette.Node The root DOM document of the XPointer operations.
fragment
string The URI fragment representing the desired XPointer.
contextNode
Object with the interface of Ft.Lib.pDomlette.Node The node to be taken as context. Basically used in the here() and origin() functions. If None, there is no given context and all operations must be absolute. The default is None.
A DOM node. The precise type (4DOM, pDomlette, cDomlette, DbDom, etc.) depends on the reader passed in. The node which was selected by the XPointer expression.
Ft.XPointer.XPtrException Raised when an invalid URI according to XPointer is provided.