Synopsis - Synopsis.Formatters.DocBook.Markup.RST.DocBookTranslator

module Synopsis.Formatters.DocBook.Markup.RST
class DocBookTranslator
File: ../Synopsis/Formatters/DocBook/Markup/RST.py
Attributes Summary:
language
doctype
body
section
context
colnames
footnotes
footnote_map
docinfo
title
subtitle
Class attributes Summary:
visit_problematic
depart_problematic
visit_system_message
depart_system_message
Methods Summary:
__init__(self, document)
astext(self)
encode(self, text)
Encode special characters in `text` & return.
encodeattr(self, text)
rearrange_footnotes(self)
Replaces ``foonote_reference`` placeholders with ``footnote`` element content as DocBook and reST handle footnotes differently.
attval(self, text, transtable = string.maketrans('\n\r\t\v\f', ' '))
Cleanse, encode, and return attribute value text.
starttag(self, node, tagname, suffix = '\n', infix = '', * * attributes)
Construct and return a start tag given a node (id & class attributes are extracted), tag name, and optional attributes.
emptytag(self, node, tagname, suffix = '\n', * * attributes)
Construct and return an XML-compatible empty tag.
visit_Text(self, node)
depart_Text(self, node)
visit_address(self, node)
depart_address(self, node)
visit_admonition(self, node, name = '')
depart_admonition(self, node = None)
visit_attention(self, node)
depart_attention(self, node)
visit_attribution(self, node)
depart_attribution(self, node)
visit_author(self, node)
visit_authors(self, node)
visit_block_quote(self, node)
depart_block_quote(self, node)
visit_bullet_list(self, node)
depart_bullet_list(self, node)
visit_caption(self, node)
depart_caption(self, node)
visit_caution(self, node)
depart_caution(self, node)
visit_citation(self, node)
depart_citation(self, node)
visit_citation_reference(self, node)
depart_citation_reference(self, node)
visit_classifier(self, node)
depart_classifier(self, node)
visit_colspec(self, node)
depart_colspec(self, node)
visit_comment(self, node, sub = re.compile('-(?=-)').sub)
Escape double-dashes in comment text.
visit_contact(self, node)
visit_copyright(self, node)
visit_danger(self, node)
depart_danger(self, node)
visit_date(self, node)
visit_decoration(self, node)
depart_decoration(self, node)
visit_definition(self, node)
depart_definition(self, node)
visit_definition_list(self, node)
depart_definition_list(self, node)
visit_definition_list_item(self, node)
depart_definition_list_item(self, node)
visit_description(self, node)
depart_description(self, node)
visit_docinfo(self, node)
Collects all docinfo elements for the document.
depart_docinfo(self, node)
visit_doctest_block(self, node)
depart_doctest_block(self, node)
visit_document(self, node)
depart_document(self, node)
visit_emphasis(self, node)
depart_emphasis(self, node)
visit_entry(self, node)
depart_entry(self, node)
visit_enumerated_list(self, node)
depart_enumerated_list(self, node)
visit_error(self, node)
depart_error(self, node)
visit_field(self, node)
depart_field(self, node)
visit_field_argument(self, node)
depart_field_argument(self, node)
visit_field_body(self, node)
depart_field_body(self, node)
visit_field_list(self, node)
depart_field_list(self, node)
visit_field_name(self, node)
depart_field_name(self, node)
visit_figure(self, node)
depart_figure(self, node)
visit_footer(self, node)
depart_footer(self, node)
visit_footnote(self, node)
depart_footnote(self, node)
visit_footnote_reference(self, node)
visit_header(self, node)
depart_header(self, node)
visit_generated(self, node)
depart_generated(self, node)
visit_hint(self, node)
depart_hint(self, node)
visit_image(self, node)
depart_image(self, node)
visit_important(self, node)
depart_important(self, node)
visit_interpreted(self, node)
depart_interpreted(self, node)
visit_label(self, node)
depart_label(self, node)
visit_legend(self, node)
depart_legend(self, node)
visit_line_block(self, node)
depart_line_block(self, node)
visit_list_item(self, node)
depart_list_item(self, node)
visit_literal(self, node)
depart_literal(self, node)
visit_literal_block(self, node)
depart_literal_block(self, node)
visit_note(self, node)
depart_note(self, node)
visit_option(self, node)
depart_option(self, node)
visit_option_argument(self, node)
depart_option_argument(self, node)
visit_option_group(self, node)
depart_option_group(self, node)
visit_option_list(self, node)
depart_option_list(self, node)
visit_option_list_item(self, node)
depart_option_list_item(self, node)
visit_option_string(self, node)
depart_option_string(self, node)
visit_organization(self, node)
visit_paragraph(self, node)
depart_paragraph(self, node)
visit_raw(self, node)
visit_reference(self, node)
depart_reference(self, node)
visit_revision(self, node)
visit_row(self, node)
depart_row(self, node)
visit_rubric(self, node)
depart_rubric(self, node)
visit_section(self, node)
depart_section(self, node)
visit_sidebar(self, node)
depart_sidebar(self, node)
visit_status(self, node)
visit_strong(self, node)
depart_strong(self, node)
visit_subscript(self, node)
depart_subscript(self, node)
visit_substitution_definition(self, node)
visit_substitution_reference(self, node)
visit_subtitle(self, node)
depart_subtitle(self, node)
visit_superscript(self, node)
depart_superscript(self, node)
visit_table(self, node)
depart_table(self, node)
visit_target(self, node)
depart_target(self, node)
visit_tbody(self, node)
depart_tbody(self, node)
visit_term(self, node)
depart_term(self, node)
visit_tgroup(self, node)
depart_tgroup(self, node)
visit_thead(self, node)
depart_thead(self, node)
visit_tip(self, node)
depart_tip(self, node)
visit_title(self, node)
depart_title(self, node)
visit_title_reference(self, node)
depart_title_reference(self, node)
visit_topic(self, node)
depart_topic(self, node)
visit_transition(self, node)
depart_transition(self, node)
visit_version(self, node)
visit_warning(self, node)
depart_warning(self, node)
unimplemented_visit(self, node)
Methods Details:
encode(self, text)
Encode special characters in `text` & return.
encodeattr(self, text)
Encode attributes characters > 128 as &#XXX;
rearrange_footnotes(self)
Replaces ``foonote_reference`` placeholders with ``footnote`` element content as DocBook and reST handle footnotes differently. DocBook defines footnotes inline, whereas they may be anywere in reST. This function replaces the first instance of a ``footnote_reference`` with the ``footnote`` element itself, and later references of the same a footnote with ``footnoteref`` elements.
attval(self, text, transtable = string.maketrans('\n\r\t\v\f', ' '))
Cleanse, encode, and return attribute value text.
starttag(self, node, tagname, suffix = '\n', infix = '', * * attributes)
Construct and return a start tag given a node (id & class attributes are extracted), tag name, and optional attributes.
emptytag(self, node, tagname, suffix = '\n', * * attributes)
Construct and return an XML-compatible empty tag.
visit_comment(self, node, sub = re.compile('-(?=-)').sub)
Escape double-dashes in comment text.
visit_docinfo(self, node)
Collects all docinfo elements for the document. Since reST's bibliography elements don't map very cleanly to DocBook, rather than maintain state and check dependencies within the different visitor fuctions all processing of bibliography elements is dont within this function. .. NOTE:: Skips processing of all child nodes as everything should be collected here.
Generated on Thu Apr 16 16:27:08 2009 by
synopsis (version devel)