Docutils document tree element class library. Classes in CamelCase are abstract base classes or auxiliary classes. The one exception is `Text`, for a text (PCDATA) node; uppercase is used to differentiate from element classes. Classes in lower_case_with_underscores are element classes, matching the XML element generic identifiers in the DTD_. The position of each node (the level at which it can occur) is significant and is represented by abstract base classes (`Root`, `Structural`, `Body`, `Inline`, etc.). Certain transformations will be easier because we can use ``isinstance(node, base_class)`` to determine the position of the node in the hierarchy. .. _DTD: https://docutils.sourceforge.io/docs/ref/docutils.dtd
Class | abbreviation |
Undocumented |
Class | acronym |
Undocumented |
Class | address |
Undocumented |
Class |
|
Undocumented |
Class | admonition |
Undocumented |
Class | attention |
Undocumented |
Class | attribution |
Undocumented |
Class | author |
Undocumented |
Class | authors |
Undocumented |
Class |
|
Undocumented |
Class |
|
Undocumented |
Class | block |
Undocumented |
Class |
|
Undocumented |
Class | bullet |
Undocumented |
Class | caption |
Undocumented |
Class | caution |
Undocumented |
Class | citation |
Undocumented |
Class | citation |
Undocumented |
Class | classifier |
Undocumented |
Class | colspec |
Undocumented |
Class | comment |
Undocumented |
Class | compound |
Undocumented |
Class | contact |
Undocumented |
Class | container |
Undocumented |
Class | copyright |
Undocumented |
Class | danger |
Undocumented |
Class | date |
Undocumented |
Class | decoration |
Undocumented |
Class |
|
Undocumented |
Class | definition |
Undocumented |
Class | definition |
Undocumented |
Class | definition |
Undocumented |
Class | description |
Undocumented |
Class | docinfo |
Undocumented |
Class | doctest |
Undocumented |
Class | document |
The document root element. |
Class |
|
`Element` is the superclass to all specific elements. |
Class | emphasis |
Undocumented |
Class | entry |
Undocumented |
Class | enumerated |
Undocumented |
Class | error |
Undocumented |
Class | field |
Undocumented |
Class | field |
Undocumented |
Class | field |
Undocumented |
Class | field |
Undocumented |
Class | figure |
Undocumented |
Class |
|
An element which directly contains preformatted text. |
Class | footer |
Undocumented |
Class | footnote |
Undocumented |
Class | footnote |
Undocumented |
Class |
|
Undocumented |
Class | generated |
Undocumented |
Class |
|
Generic "Visitor" abstract superclass, for simple traversals. |
Class | header |
Undocumented |
Class | hint |
Undocumented |
Class | image |
Undocumented |
Class | important |
Undocumented |
Class |
|
Undocumented |
Class | inline |
Undocumented |
Class |
|
Internal elements that don't appear in output. |
Class | label |
Undocumented |
Class |
|
Contains a `label` as its first element. |
Class | legend |
Undocumented |
Class | line |
Undocumented |
Class | line |
Undocumented |
Class | list |
Undocumented |
Class | literal |
Undocumented |
Class | literal |
Undocumented |
Class | math |
Undocumented |
Class | math |
Undocumented |
Class | meta |
Container for "invisible" bibliographic data, or meta-data. |
Class |
|
Abstract base class of nodes in a document tree. |
Class |
|
Raise to indicate that the target of a search has been found. This exception must be caught by the client; it is not caught by the traversal code. |
Class |
|
"Visitor" pattern [GoF95]_ abstract superclass implementation for document tree traversals. |
Class | note |
Undocumented |
Class | option |
Undocumented |
Class | option |
Undocumented |
Class | option |
Undocumented |
Class | option |
Undocumented |
Class | option |
Undocumented |
Class | option |
Undocumented |
Class | organization |
Undocumented |
Class | paragraph |
Undocumented |
Class |
|
Undocumented |
Class | pending |
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. |
Class |
|
Category of Node which may occur before Bibliographic Nodes. |
Class | problematic |
Undocumented |
Class | raw |
Raw data that is to be passed untouched to the Writer. |
Class | reference |
Undocumented |
Class |
|
Undocumented |
Class | reprunicode |
Deprecated backwards compatibility stub. Use the standard `str` instead. |
Class |
|
Undocumented |
Class | revision |
Undocumented |
Class |
|
Undocumented |
Class | row |
Undocumented |
Class | rubric |
Undocumented |
Class | section |
Undocumented |
Class |
|
List-like elements. |
Class | sidebar |
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... |
Class |
|
Do not visit any children of the current node. The current node's siblings and ``depart_...`` method are not affected. |
Class |
|
Do not call the current node's ``depart_...`` method. The current node's children and siblings are not affected. |
Class |
|
Do not visit the current node's children, and do not call the current node's ``depart_...`` method. |
Class |
|
Do not visit any more siblings (to the right) of the current node. The current node's children and its ``depart_...`` method are not affected. |
Class |
|
Base class for sparse traversals, where only certain node types are of interest. When ``visit_...`` & ``depart_...`` methods should be implemented for *all* node types (such as for `docutils.writers.Writer` subclasses), subclass `NodeVisitor` instead. |
Class |
|
Special internal body elements. |
Class | status |
Undocumented |
Class |
|
Stop the traversal altogether. The current node's ``depart_...`` method is not affected. The parent nodes ``depart_...`` methods are also called as usual. No other nodes are visited. This is an alternative to NodeFound that does not cause exception handling to trickle up to the caller. |
Class | strong |
Undocumented |
Class |
|
Undocumented |
Class | subscript |
Undocumented |
Class | substitution |
Undocumented |
Class | substitution |
Undocumented |
Class | subtitle |
Undocumented |
Class | superscript |
Undocumented |
Class | system |
System message element. |
Class | table |
Undocumented |
Class | target |
Undocumented |
Class |
|
No class docstring; 1/2 class variable documented |
Class | tbody |
Undocumented |
Class | term |
Undocumented |
Class |
|
Instances are terminal nodes (leaves) containing text only; no child nodes or attributes. Initialize by passing a string to the constructor. |
Class |
|
An element which directly contains text. |
Class | tgroup |
Undocumented |
Class | thead |
Undocumented |
Class | tip |
Undocumented |
Class | title |
Undocumented |
Class | title |
Undocumented |
Class |
|
Undocumented |
Class | topic |
Topics are terminal, "leaf" mini-sections, like block quotes with titles, or textual figures. A topic is just like a section, except that it has no subsections, and it doesn't have to conform to section placement rules. |
Class | transition |
Undocumented |
Class |
|
Make a complete copy of a tree or branch, including element attributes. |
Class |
|
Base class for `NodeVisitor`-related tree pruning exceptions. |
Class | version |
Undocumented |
Class | warning |
Undocumented |
Function | dupname |
Undocumented |
Function | ensure |
Deprecated backwards compatibility stub returning `s`. |
Function | fully |
Return a case- and whitespace-normalized name. |
Function | make |
Convert `string` into an identifier and return it. |
Function | pseudo |
Quote attributes for pseudo-xml |
Function | serial |
Escape string values that are elements of a list, for serialization. |
Function | unescape |
Return a string with nulls removed or restored to backslashes. Backslash-escaped spaces are also removed. |
Function | whitespace |
Return a whitespace-normalized name. |
Variable | node |
A list of names of all concrete Node subclasses. |
Function | _add |
Save typing with dynamic assignments: |
Function | _call |
Undocumented |
Function | _call |
Undocumented |
Function | _nop |
Undocumented |
Variable | _non |
Undocumented |
Variable | _non |
Undocumented |
Variable | _non |
Undocumented |
Variable | _non |
Undocumented |
Convert `string` into an identifier and return it. Docutils identifiers will conform to the regular expression ``[a-z](-?[a-z0-9]+)*``. For CSS compatibility, identifiers (the "class" and "id" attributes) should have no underscores, colons, or periods. Hyphens may be used. - The `HTML 4.01 spec`_ defines identifiers based on SGML tokens: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). - However the `CSS1 spec`_ defines identifiers based on the "name" token, a tighter interpretation ("flex" tokenizer notation; "latin1" and "escape" 8-bit characters have been replaced with entities):: unicode \[0-9a-f]{1,4} latin1 [¡-ÿ] escape {unicode}|\[ -~¡-ÿ] nmchar [-a-z0-9]|{latin1}|{escape} name {nmchar}+ The CSS1 "nmchar" rule does not include underscores ("_"), colons (":"), or periods ("."), therefore "class" and "id" attributes should not contain these characters. They should be replaced with hyphens ("-"). Combined with HTML's requirements (the first character must be a letter; no "unicode", "latin1", or "escape" characters), this results in the ``[a-z](-?[a-z0-9]+)*`` pattern. .. _HTML 4.01 spec: https://www.w3.org/TR/html401 .. _CSS1 spec: https://www.w3.org/TR/REC-CSS1