2.3 Processor methods

Processor ()

clearError ()
Clears the pending error for the given instance of Sablot.Processor.

freeResultArgs ()
kill all result arg buffers from the last Sablot run

getResultArg (argname)
gets the result arg buffer from the last Sablot run the buffer is identified by an URI (to enable output to multiple documents)

regHandler (type, handler)
General handler registrator.

type the type of the handler. One of HLR_MESSAGE, HLR_MISC, HLR_SAX, HLR_SCHEME.

handler some object that supports the methods of the handler protocol. The protocol for each handler type is described below.

unregHandler (type, handler)
General handler unregistrator.

remove handler from the Processor object.

run (sheeturi, inputuri, resulturi, params, args)
runs the existing instance on the given documents.

sheetURI URI of the XSLT stylesheet

inputURI URI of the XML document

params a list of pairs defining the top-level parameters to be passed, interpreted as a sequence of (name, value) pairs.

arguments a list of pairs defining the named buffers to be passed, interpreted as a sequence of (name, value) pairs.

The URIs sheeturi and inputuri may have the builtin types file: or arg:. For other URI-types (ftp: or http: in, e.g., http://foo/bar.xml) may be read through the scheme handler interface (see below).

params and args are both lists of pairs (tuples of two values), e.g. [('name1', 'value1'), ('name2', 'value2')]. The names in args may be used as arg:-URIs in the sheeturi and inputuri arguments.

setBase (base)
overrides the default base URI for relative reference resolution.

setBaseForScheme (scheme, base)
a softer form of SablotSetBase: the hard base URI will only be in effect for relative references whose bases have the given scheme.

Example: assume we call p.setBaseForScheme("arg", "http://server") and then runs a stylesheet at "arg:/xxx" which contains "document('foo.xml')". The relative reference is resolved as "http://server/foo.xml" but if the stylesheet were at "file:/xxx" it would become "file:/foo.xml".

setLog (filename, level)
sets the logging options. Logging is off by default.


Send comments to guenter@ubka.uni-karlsruhe.de.