def __handle_table__(self, xmlnode, dstree, dsnode): if 'summary' in xmlnode.attrib: value = xmlnode.attrib['summary'] dsnode = self.prepareNode(dstree, dsnode, DocumentStructure.PARAGRAPH) if DocumentStructure.getLevel(dsnode) == DocumentStructure.PARAGRAPH: value = util.ensureEndsInPeriod(value) util.appendToValue(dsnode, ' ' + value + ' ') return self.handleIndent(dsnode, xmlnode)
def __handle_img__(self, xmlnode, dstree, dsnode): value = '' if 'alt' in xmlnode.attrib: value = xmlnode.attrib['alt'] elif 'title' in xmlnode.attrib: value = xmlnode.attrib['title'] dsnode = self.prepareNode(dstree, dsnode, DocumentStructure.PARAGRAPH) if DocumentStructure.getLevel(dsnode) == DocumentStructure.PARAGRAPH: value = util.ensureEndsInPeriod(value) util.appendToValue(dsnode, ' ' + value + ' ') return self.handleIndent(dsnode, xmlnode)
def handleReplaceQuoted(self, dstree, dsnode, value): util.appendToValue(dsnode, value)