+ def handle_definiendum(self, element):
+ nxt = element.getnext()
+ definiens_s = ''
+
+ # let's pull definiens from another document
+ if self.options['slowniczek_xml'] and (not nxt or nxt.tag != 'definiens'):
+ sxml = self.options['slowniczek_xml']
+ assert element.text != ''
+ defloc = sxml.xpath("//definiendum[text()='%s']" % element.text)
+ if defloc:
+ definiens = defloc[0].getnext()
+ if definiens.tag == 'definiens':
+ subgen = EduModule(self.options)
+ definiens_s = subgen.generate(definiens)
+
+ return u"<dt>", u"</dt>" + definiens_s
+
+ def handle_definiens(self, element):
+ return u"<dd>", u"</dd>"
+
+ def handle_podpis(self, element):
+ return u"""<div class="caption">""", u"</div>"
+
+ def handle_tabela(self, element):
+ has_frames = int(element.attrib.get("ramki", "0"))
+ if has_frames: frames_c = "framed"
+ else: frames_c = ""
+ return u"""<table class="%s">""" % frames_c, u"</table>"
+
+ def handle_wiersz(self, element):
+ return u"<tr>", u"</tr>"
+
+ def handle_kol(self, element):
+ return u"<td>", u"</td>"
+