class documentation

class AttrListTreeprocessor(Treeprocessor): (source)

View In Hierarchy

Undocumented

Method assign_attrs Assign attrs to element.
Method run Subclasses of Treeprocessor should implement a `run` method, which takes a root ElementTree. This method can return another ElementTree object, and the existing root ElementTree will be replaced, or it can modify the current tree and return None.
Method sanitize_name Sanitize name as 'an XML Name, minus the ":"'. See https://www.w3.org/TR/REC-xml-names/#NT-NCName
Constant BASE_RE Undocumented
Constant BLOCK_RE Undocumented
Constant HEADER_RE Undocumented
Constant INLINE_RE Undocumented
Constant NAME_RE Undocumented

Inherited from Processor (via Treeprocessor):

Method __init__ Undocumented
Instance Variable md Undocumented
def assign_attrs(self, elem, attrs): (source)

Assign attrs to element.

def run(self, doc): (source)

Subclasses of Treeprocessor should implement a `run` method, which takes a root ElementTree. This method can return another ElementTree object, and the existing root ElementTree will be replaced, or it can modify the current tree and return None.

def sanitize_name(self, name): (source)

Sanitize name as 'an XML Name, minus the ":"'. See https://www.w3.org/TR/REC-xml-names/#NT-NCName

BASE_RE: str = (source)

Undocumented

Value
'\\{\\:?[ ]*([^\\}\\n ][^\\}\\n]*)[ ]*\\}'
BLOCK_RE = (source)

Undocumented

Value
re.compile("""\\n[ ]*{}[ ]*$""".format(BASE_RE))
HEADER_RE = (source)

Undocumented

Value
re.compile("""[ ]+{}[ ]*$""".format(BASE_RE))
INLINE_RE = (source)

Undocumented

Value
re.compile("""^{}""".format(BASE_RE))
NAME_RE = (source)

Undocumented

Value
re.compile(r'[^A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u2
00c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd:-\.0
-9\xb7\u0300-\u036f\u203f-\u2040]+')