4Suite API Documentation

Module Ft.Xml.XUpdate

XUpdate request processing

XUpdate is specified (poorly) at
http://xmldb-org.sourceforge.net/xupdate/xupdate-wd.html

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

Classes

class Processor

Methods

__init__(self, reader=None)
evaluateExpression(self, context, expression)
execute(self, node, xupdate, variables=None, processorNss=None)
output(self)
Returns the current output writer
parseAVT(self, avt)
popResult(self)
pushDomResult(self, ownerDocument)
visit(self, context, node, preserveSpace)

A reader of XUpdate documents. Must contain a fromSrc() method that takes an Ft.Xml.InputSource and returns a Domlette document. It does not need to detect XUpdate syntax errors.

Methods

fromSrc = parse(self, inputSource)
Reads XML from an Ft.Xml.Inputsource.InputSource, and returns a Domlette document node.

Methods inherited from class Ft.Xml.Domlette.NonvalidatingReaderBase

Methods inherited from class Ft.Xml.Domlette._Reader



class XUpdateException(Ft.FtException)
Exception class for errors specific to XUpdate processing

Methods

__init__(self, errorCode, *args, **kwargs)

Methods inherited from class Ft.FtException

Methods inherited from class exceptions.Exception

__getitem__

Fields

NO_TEST = 12

Functions

ApplyXUpdate(doc, xup)
Takes 2 InputSources, one for the source document and one for the XUpdate instructions. It returns a DOM node representing the result of applying the XUpdate to the source document (the document is modified in-place).

Fields

XUPDATE_NS = 'http://www.xmldb.org/xupdate'
g_errorMessages = {1: 'Syntax error in expression %(expr)r: %(err)s', 2: 'Unrecognized instruction in XUpdate namespace: %(name)r', 10: 'Missing required version attribute', 11: 'Missing required select attribute', 12: 'Missing required "test" attribute', 13: 'select expression "%(expr)s" must evaluate to a non-empty node-set', 14: 'XUpdate version %(version)s unsupported by this implementation', 100: 'Invalid DOM node %(node)r', 101: 'Unknown node type %(nodetype)r'}