4Suite API Documentation

Module amara.bindery

Classes:
Globals:

Classes

class binder(amara.pyxml_standins.LexicalHandler, object)

Methods

__init__(self, prefixes=None)
Overrides: __init__ from class object
add_rule(self, rule, event_type=None)
Add a rule for an event type. You can also manipulate self.rules directly, but consider details such as priority and add_rule hooks rule - the rule object. Can be a function or an instance that defines an apply() function if you do not specify the event type, it must be set as an attribute on the rule
apply_rules(self)
characters(self, text)
comment(self, body)
#Overridden LexicalHandler methods
Overrides: comment from class LexicalHandler
endDocument(self)
endElementNS(self, name, qname)
processingInstruction(self, target, data)
read_xml(self, input_source)
remove_rule(self, rule_callback, event_type)
Remove a rule for a given event. Do so smartly. If we're within an apply_rules, don't screw up the loop rule - rule callback (function or "apply" method)
set_binding_class(self, nsuri, local, class_)
Map a Python class to an element type so that each occurrence of the element results in an instance of the class
set_pi_binding_class(self, target, class_)
Map a Python class to a processing instruction target so that each occurrence of a PI with that target results in an instance of the class
startDTD(self, name, public_id, system_id)
Overrides: startDTD from class LexicalHandler
startDocument(self)
startElementNS(self, name, qname, attribs)
#Overridden DocumentHandler methods
startPrefixMapping(self, prefix, uri)
#Overridden ContentHandler methods

Methods inherited from class amara.pyxml_standins.LexicalHandler

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'binder' objects>
__weakref__ = <attribute '__weakref__' of 'binder' objects>

Members inherited from class object

__class__

Globals

ANY_NAMESPACE = 'http://uche.ogbuji.net/tech/4suite/amara/reserved/any-namespace'
PY_REPLACE_PAT = <_sre.SRE_Pattern object at 0xb786f170>
Compiled regular expression objects
REMOVE_RULE = True
RESERVED_NAMES = ImmutableSet(['and', '__module__', 'raise', 'is'..., '__repr__', '__hash__', 'or', 'def', 'lambda'])
Immutable set class.
TOP = -1