Sidebars are like miniature, parallel documents that occur inside other documents, providing related or reference material. A sidebar is typically offset by a border and "floats" to the side of the page; the document's main text may flow around it. Sidebars can also be likened to super-footnotes; their content is outside of the flow of the document's main text.
Sidebars are allowed wherever body elements (list, table, etc.) are allowed, but only at the top level of a section or document. Sidebars cannot nest inside sidebars, topics, or body elements; you can't have a sidebar inside a table, list, block quote, etc.
There are no implemented interfaces.
('ids', 'classes', 'names', 'dupnames', 'backrefs')
Return a DOM fragment representation of this Node.
first_child_matching_class(childclass, start=0, end=9223372036854775807)
Return the index of the first child whose class exactly matches.
first_child_not_matching_class(childclass, start=0, end=9223372036854775807)
Return the index of the first child whose class does not match.
next_node(condition=None, include_self=0, descend=1, siblings=0, ascend=0)
Return the first node in the iterable returned by traverse(), or None if the iterable is empty.
Parameter list is the same as of traverse. Note that include_self defaults to 0, though.
Note that this Element has been referenced by its name name or id id.
pformat(indent=' ', level=0)
Replace one child Node with another child or children.
Replace self node with new, where new is a node or a list of nodes.
Add a new class to the "classes" attribute.
traverse(condition=None, include_self=1, descend=1, siblings=0, ascend=0)
Return an iterable containing
If condition is not None, the iterable contains only nodes for which condition(node) is true. If condition is a node class cls, it is equivalent to a function consisting of return isinstance(node, cls).
If ascend is true, assume siblings to be true as well.
For example, given the following tree:
<paragraph> <emphasis> <--- emphasis.traverse() and <strong> <--- strong.traverse() are called. Foo Bar <reference name="Baz" refid="baz"> Baz
Then list(emphasis.traverse()) equals
[<emphasis>, <strong>, <#text: Foo>, <#text: Bar>]
and list(strong.traverse(ascend=1)) equals
[<strong>, <#text: Foo>, <#text: Bar>, <reference>, <#text: Baz>]
Update basic attributes ('ids', 'names', 'classes', 'dupnames', but not 'source') from node or dictionary dict.
Traverse a tree of Node objects, calling the dispatch_visit() method of visitor when entering each node. (The walkabout() method is similar, except it also calls the dispatch_departure() method before exiting each node.)
This tree traversal supports limited in-place tree modifications. Replacing one node with one or more nodes is OK, as is removing an element. However, if the node removed or replaced occurs after the current node, the old node will still be traversed, and any new nodes will not.
Within visit methods (and depart methods for walkabout()), TreePruningException subclasses may be raised (SkipChildren, SkipSiblings, SkipNode, SkipDeparture).
Parameter visitor: A NodeVisitor object, containing a visit implementation for each Node subclass encountered.
Perform a tree traversal similarly to Node.walk() (which see), except also call the dispatch_departure() method before exiting each node.
Parameter visitor: A NodeVisitor object, containing a visit and depart implementation for each Node subclass encountered.
There are no known subclasses.