)"""
self.write(self._indent(' '))
self.format_children(layout)
self.writeln('')
def visit_span(self, layout):
"""display links (using )"""
#TODO: translate in docbook
self.write('' % self.handle_attrs(layout))
self.format_children(layout)
self.write('')
def visit_link(self, layout):
"""display links (using )"""
self.write('%s' % (layout.url,
self.handle_attrs(layout),
layout.label))
def visit_verbatimtext(self, layout):
"""display verbatim text (using )"""
self.writeln(self._indent(' '))
self.write(layout.data.replace('&', '&').replace('<', '<'))
self.writeln(self._indent(' '))
def visit_text(self, layout):
"""add some text"""
self.write(layout.data.replace('&', '&').replace('<', '<'))
def _indent(self, string):
"""correctly indent string according to section"""
return ' ' * 2*(self.section) + string