|
| | __init__ (self, transform, details=None, rawsource='', *children, **attributes) |
| |
| | pformat (self, indent=' ', level=0) |
| |
| | copy (self) |
| |
|
| __repr__ (self) |
| |
|
| shortrepr (self) |
| |
|
| __str__ (self) |
| |
|
| starttag (self, quoteattr=None) |
| |
|
| endtag (self) |
| |
|
| emptytag (self) |
| |
|
| __len__ (self) |
| |
|
| __contains__ (self, key) |
| |
|
| __getitem__ (self, key) |
| |
|
| __setitem__ (self, key, item) |
| |
|
| __delitem__ (self, key) |
| |
|
| __add__ (self, other) |
| |
|
| __radd__ (self, other) |
| |
| | __iadd__ (self, other) |
| |
| | astext (self) |
| |
|
| non_default_attributes (self) |
| |
|
| attlist (self) |
| |
|
| get (self, key, failobj=None) |
| |
|
| hasattr (self, attr) |
| |
|
| delattr (self, attr) |
| |
|
| setdefault (self, key, failobj=None) |
| |
| | get_language_code (self, fallback='') |
| |
|
| append (self, item) |
| |
|
| extend (self, item) |
| |
|
| insert (self, index, item) |
| |
|
| pop (self, i=-1) |
| |
|
| remove (self, item) |
| |
|
| index (self, item, start=0, stop=sys.maxsize) |
| |
| | previous_sibling (self) |
| |
|
| is_not_default (self, key) |
| |
| | update_basic_atts (self, dict_) |
| |
| | append_attr_list (self, attr, values) |
| |
| | coerce_append_attr_list (self, attr, value) |
| |
| | replace_attr (self, attr, value, force=True) |
| |
| | copy_attr_convert (self, attr, value, replace=True) |
| |
| | copy_attr_coerce (self, attr, value, replace) |
| |
| | copy_attr_concatenate (self, attr, value, replace) |
| |
| | copy_attr_consistent (self, attr, value, replace) |
| |
| | update_all_atts (self, dict_, update_fun=copy_attr_consistent, replace=True, and_source=False) |
| |
| | update_all_atts_consistantly (self, dict_, replace=True, and_source=False) |
| |
| | update_all_atts_concatenating (self, dict_, replace=True, and_source=False) |
| |
| | update_all_atts_coercion (self, dict_, replace=True, and_source=False) |
| |
| | update_all_atts_convert (self, dict_, and_source=False) |
| |
|
| clear (self) |
| |
| | replace (self, old, new) |
| |
| | replace_self (self, new) |
| |
| | first_child_matching_class (self, childclass, start=0, end=sys.maxsize) |
| |
| | first_child_not_matching_class (self, childclass, start=0, end=sys.maxsize) |
| |
| | deepcopy (self) |
| |
| | set_class (self, name) |
| |
| | note_referenced_by (self, name=None, id=None) |
| |
| | is_not_list_attribute (cls, attr) |
| |
| | is_not_known_attribute (cls, attr) |
| |
| | document (self) |
| |
|
| document (self, value) |
| |
| | __bool__ (self) |
| |
| | asdom (self, dom=None) |
| |
|
| setup_child (self, child) |
| |
| | walk (self, visitor) |
| |
| | walkabout (self, visitor) |
| |
| | traverse (self, condition=None, include_self=True, descend=True, siblings=False, ascend=False) |
| |
| | findall (self, condition=None, include_self=True, descend=True, siblings=False, ascend=False) |
| |
| | next_node (self, condition=None, include_self=False, descend=True, siblings=False, ascend=False) |
| |
The "pending" element is used to encapsulate a pending operation: the
operation (transform), the point at which to apply it, and any data it
requires. Only the pending operation's location within the document is
stored in the public document tree (by the "pending" object itself); the
operation and its data are stored in the "pending" object's internal
instance attributes.
For example, say you want a table of contents in your reStructuredText
document. The easiest way to specify where to put it is from within the
document, with a directive::
.. contents::
But the "contents" directive can't do its work until the entire document
has been parsed and possibly transformed to some extent. So the directive
code leaves a placeholder behind that will trigger the second phase of its
processing, something like this::
<pending ...public attributes...> + internal attributes
Use `document.note_pending()` so that the
`docutils.transforms.Transformer` stage of processing can run all pending
transforms.