class TransformSpec: (source)
Known subclasses: docutils.Component, docutils.io.Input, docutils.io.Output, docutils.transforms.Transformer
Runtime transform specification base class.
TransformSpec subclass objects used by docutils.transforms.Transformer.
| Method | get |
Transforms required by this class. Override in subclasses. |
| Class Variable | default |
Undocumented |
| Class Variable | unknown |
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.tranforms.references... |
docutils.transforms.TransformerList 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.tranforms.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.