class documentation

class TransformSpec:

Known subclasses: docutils.Component,,, docutils.transforms.Transformer

View In Hierarchy

Runtime transform specification base class.

TransformSpec subclass objects used by docutils.transforms.Transformer.

Method get​_transforms Transforms required by this class. Override in subclasses.
Class Variable default​_transforms Undocumented
Class Variable unknown​_reference​_resolvers No summary
def get_transforms(self):
Transforms required by this class. Override in subclasses.
default_transforms: tuple =


unknown_reference_resolvers: tuple =

List of functions to try to resolve unknown references. Unknown references have a 'refname' attribute which doesn't correspond to any target in the document. Called when the transforms in docutils.transforms.references are unable to find a correct target. The list should contain functions which will try to resolve unknown references, with the following signature:

def reference_resolver(node):
    '''Returns boolean: true if resolved, false if not.'''

If the function is able to resolve the reference, it should also remove the 'refname' attribute and mark the node as resolved:

del node['refname']
node.resolved = 1

Each function must have a "priority" attribute which will affect the order the unknown_reference_resolvers are run:

reference_resolver.priority = 100

Override in subclasses.