Methods Details:
Encode special characters in `text` & return.
Encode attributes characters > 128 as &#XXX;
(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.
(self, node, sub = re.compile('-(?=-)').sub)
Escape double-dashes in comment text.
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.