XML Documents

class bkgen.document.Document(fn=None, root=None, tree=None, parser=None, encoding=’UTF-8’, schemas=None, **args)[source]

Bases: bxml.xml.XML, bkgen.source.Source

NS = {‘epub’: ‘http://www.idpf.org/2007/ops’, ‘html’: ‘http://www.w3.org/1999/xhtml’, ‘pub’: ‘http://publishingxml.org/ns’}
ROOT_TAG = ‘{http://publishingxml.org/ns}document’
aid(**params)[source]
documents()[source]
html(fn=None, ext=’.xhtml’, output_path=None, resources=[], **args)[source]
html_content(fn=None, output_path=None, resources=[], **args)[source]
icml(**params)[source]
images()[source]
classmethod load(fn, section_id=None, **args)[source]
metadata()[source]
render_includes()[source]

put included content into the <pub:include> elements in the document.

section_content(section_id)[source]

return an xml string containing the content of the section

stylesheet()[source]