- '<itemref idref="intro" />'))
- zip.writestr('OPS/intro.html', open(get_resource('epub/intro.html')).read())
+ '<itemref idref="first" />'))
+ html_tree = xslt(document.edoc, get_resource('epub/xsltFirst.xsl'))
+# chars.update(used_chars(html_tree.getroot()))
+ zip.writestr('OPS/first.html', etree.tostring(
+ html_tree, method="html", pretty_print=True))
+
+ if intro_file:
+ manifest.append(etree.fromstring(
+ '<item id="intro" href="intro.html" media-type="application/xhtml+xml" />'))
+ spine.append(etree.fromstring(
+ '<itemref idref="intro" />'))
+ zip.writestr('OPS/intro.html', open(intro_file or get_resource('epub/intro.html')).read())