Package docutils :: Package writers :: Module docutils_xml :: Class Writer
[show private | hide private]
[frames | no frames]

Class Writer

 SettingsSpec --+        
                |        
TransformSpec --+        
                |        
        Component --+    
                    |    
               Writer --+
                        |
                       Writer


Method Summary
  translate(self)
Override to do final document tree translation.
    Inherited from Writer
  __init__(self)
Initialize the Writer instance.
  write(self, document, destination)
    Inherited from Component
  supports(self, format)
Is format supported by this component?

Class Variable Summary
str doctype = '<!DOCTYPE document PUBLIC "+//IDN docutils.so...
str generator = '<!-- Generated by Docutils %s -->\n'
NoneType output = None                                                                  
tuple settings_spec = ('"Docutils XML" Writer Options', 'Warni...
tuple supported = ('xml',)
str xml_declaration = '<?xml version="1.0" encoding="%s"?>\n...
    Inherited from Writer
str component_type = 'writer'
NoneType destination = None                                                                  
NoneType document = None                                                                  
NoneType language = None                                                                  
    Inherited from SettingsSpec
tuple relative_path_settings = ()
NoneType settings_default_overrides = None                                                                  
NoneType settings_defaults = None                                                                  
    Inherited from TransformSpec
tuple default_transforms = ()

Method Details

translate(self)

Override to do final document tree translation.

This is usually done with a docutils.nodes.NodeVisitor subclass, in combination with a call to docutils.nodes.Node.walk() or docutils.nodes.Node.walkabout(). The NodeVisitor subclass must support all standard elements (listed in docutils.nodes.node_class_names) and possibly non-standard elements used by the current Reader as well.

Overrides:
docutils.writers.Writer.translate (inherited documentation)

Class Variable Details

doctype

Type:
str
Value:
'''<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Doc\
utils Generic//EN//XML" "http://docutils.sourceforge.net/spec/docutils\
.dtd">
'''                                                                    

generator

Type:
str
Value:
'''<!-- Generated by Docutils %s -->
'''                                                                    

output

Type:
NoneType
Value:
None                                                                  

settings_spec

Type:
tuple
Value:
('"Docutils XML" Writer Options',
 'Warning: the --newlines and --indents options may adversely affect w\
hitespace; use them only for reading convenience.',
 (('Generate XML with newlines before and after tags.',
   ['--newlines'],
   {'action': 'store_true'}),
  ('Generate XML with indents and newlines.',
   ['--indents'],
...                                                                    

supported

Type:
tuple
Value:
('xml',)                                                               

xml_declaration

Type:
str
Value:
'''<?xml version="1.0" encoding="%s"?>
'''                                                                    

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