![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Functions | |
| unescape (text, restore_backslashes=False, respect_whitespace=False) | |
| _call_default_visit (self, node) | |
| _call_default_departure (self, node) | |
| _nop (self, node) | |
| _add_node_class_names (names) | |
| make_id (string) | |
| dupname (node, name) | |
| fully_normalize_name (name) | |
| whitespace_normalize_name (name) | |
| serial_escape (value) | |
| pseudo_quoteattr (value) | |
Variables | |
| str | node_class_names |
| _non_id_chars = re.compile('[^a-z0-9]+') | |
| _non_id_at_ends = re.compile('^[-0-9]+|-+$') | |
| dict | _non_id_translate |
| dict | _non_id_translate_digraphs |
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
|
protected |
Save typing with dynamic assignments:
| docutils.nodes.fully_normalize_name | ( | name | ) |
Return a case- and whitespace-normalized name.
| docutils.nodes.make_id | ( | string | ) |
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
| docutils.nodes.pseudo_quoteattr | ( | value | ) |
Quote attributes for pseudo-xml
| docutils.nodes.serial_escape | ( | value | ) |
Escape string values that are elements of a list, for serialization.
| docutils.nodes.unescape | ( | text, | |
restore_backslashes = False, |
|||
respect_whitespace = False |
|||
| ) |
Return a string with nulls removed or restored to backslashes. Backslash-escaped spaces are also removed.
| docutils.nodes.whitespace_normalize_name | ( | name | ) |
Return a whitespace-normalized name.
|
protected |
| str docutils.nodes.node_class_names |