4Suite API Documentation

Module Ft.Xml.Xslt.NullWriter

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


class NullWriter
All XSLT output writers should subclass NullWriter


__init__(self, outputParams=None)
outputParams - If given, an instance of Ft.Xml.Xslt.OutputParameters.OutputParameters, from which the standard XSLT output parameters can be read.
attribute(self, name, value, namespace=None)
Called when an attribute node is generated in the result tree.
name - the local name.
value - the attribute value.
namespace - the namespace URI.
comment(self, body)
Called when a comment node is generated in the result tree.
body - comment text.
copyNodes(self, nodeOrNodelist)
Copies the given list of Domlette nodes by calling the appropriate methods. Generally does not need to be overridden.
Called once at the end of output writing.
endElement(self, name, namespace=None)
Called at the end of element node generation.
name - the local name.
namespace - the namespace URI.
Returns the media type of the output, as a string.
If the output is being buffered, returns the buffered result (as a byte string, usually).
If the output is being directed to a stream (Python file-like object), returns the stream without any encoding wrappers.
namespace(self, prefix, namespace)
Called when a namespace node is explicitly generated in the result tree (as by the xsl:namespace instruction).
prefix - the prefix.
namespace - the namespace URI.
processingInstruction(self, target, data)
Called when an processing instruction node is generated in the result tree.
target - the instruction target.
data - the instruction.
Called once at the beginning of output writing.
startElement(self, name, namespace=None, extraNss=None)
Called when an element node is generated in the result tree. Subsequent method calls generate the element's attributes and content.
name - the local name.
namespace - the namespace URI.
extraNss - new namespace bindings (dictionary of prefixes to URIs)
           established by this element
text(self, text, escapeOutput=True)
Called when a text node is generated in the result tree.
text - content of the text node.
escapeOutput - deprecated; ignore.


GetAllNs(node) -> dict
Get all of the namespaces defined in scope of this node.


XMLNS_NAMESPACE = u'http://www.w3.org/2000/xmlns/'