22 |
from xml.dom.ext.reader import PyExpat |
from xml.dom.ext.reader import PyExpat |
23 |
from xml.dom import Node |
from xml.dom import Node |
24 |
from xml import xpath |
from xml import xpath |
25 |
|
import codecs |
26 |
|
|
27 |
import pathetic |
import pathetic |
28 |
import compute |
import compute |
196 |
max_height = int(dom.getAttribute('max_height') or 0) |
max_height = int(dom.getAttribute('max_height') or 0) |
197 |
height = int(dom.getAttribute('height') or 0) |
height = int(dom.getAttribute('height') or 0) |
198 |
max_num_pages = int(dom.getAttribute('max_num_pages') or 0) |
max_num_pages = int(dom.getAttribute('max_num_pages') or 0) |
199 |
|
encoder = codecs.lookup(dom.getAttribute('output_encoder') or 'cp850')[0] |
200 |
template = pathetic.Template(max_num_pages=max_num_pages, |
template = pathetic.Template(max_num_pages=max_num_pages, |
201 |
max_height=max_height, |
max_height=max_height, |
202 |
height=height) |
height=height, |
203 |
|
encoder=encoder) |
204 |
init_detail_from_xml(template, dom) |
init_detail_from_xml(template, dom) |
205 |
self.template = template |
self.template = template |
206 |
self.init_stack() |
self.init_stack() |