Package docutils :: Package transforms :: Module components :: Class Filter
[show private | hide private]
[frames | no frames]

Class Filter

Transform --+
            |
           Filter


Include or exclude elements which depend on a specific Docutils component.

For use with nodes.pending elements. A "pending" element's dictionary attribute details must contain the keys "component" and "format". The value of details['component'] must match the type name of the component the elements depend on (e.g. "writer"). The value of details['format'] is the name of a specific format or context of that component (e.g. "html"). If the matching Docutils component supports that format or context, the "pending" element is replaced by the contents of details['nodes'] (a list of nodes); otherwise, the "pending" element is removed.

For example, the reStructuredText "meta" directive creates a "pending" element containing a "meta" element (in pending.details['nodes']). Only writers (pending.details['component'] == 'writer') supporting the "html" format (pending.details['format'] == 'html') will include the "meta" element; it will be deleted from the output of all other writers.


Method Summary
  apply(self)
Override to apply the transform to the document tree.
    Inherited from Transform
  __init__(self, document, startnode)
Initial setup for in-place document transforms.

Class Variable Summary
int default_priority = 780                                                                   

Method Details

apply(self)

Override to apply the transform to the document tree.
Overrides:
docutils.transforms.Transform.apply (inherited documentation)

Class Variable Details

default_priority

Type:
int
Value:
780                                                                   

Generated by Epydoc 2.0 on Tue Jul 22 05:30:59 2003 http://epydoc.sf.net