1 | # Authors: David Goodger |
---|
2 | # Contact: goodger@users.sourceforge.net |
---|
3 | # Revision: $Revision: 1645 $ |
---|
4 | # Date: $Date: 2003-08-27 22:50:43 +0200 (Wed, 27 Aug 2003) $ |
---|
5 | # Copyright: This module has been placed in the public domain. |
---|
6 | |
---|
7 | """ |
---|
8 | Simple internal document tree Writer, writes indented pseudo-XML. |
---|
9 | """ |
---|
10 | |
---|
11 | __docformat__ = 'reStructuredText' |
---|
12 | |
---|
13 | |
---|
14 | from docutils import writers |
---|
15 | |
---|
16 | |
---|
17 | class Writer(writers.Writer): |
---|
18 | |
---|
19 | supported = ('pprint', 'pformat', 'pseudoxml') |
---|
20 | """Formats this writer supports.""" |
---|
21 | |
---|
22 | config_section = 'pseudoxml writer' |
---|
23 | config_section_dependencies = ('writers',) |
---|
24 | |
---|
25 | output = None |
---|
26 | """Final translated form of `document`.""" |
---|
27 | |
---|
28 | def translate(self): |
---|
29 | self.output = self.document.pformat() |
---|
30 | |
---|
31 | def supports(self, format): |
---|
32 | """This writer supports all format-specific elements.""" |
---|
33 | return 1 |
---|