Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 def handleReplaceQuoted(self, dstree, dsnode, value):
     util.appendToValue(dsnode, value)