From: Fredrik Unger Date: Thu, 8 Mar 2012 16:02:11 +0000 (+0100) Subject: Adding omit_xml_declaration=True to amara call, but does not yet work, considering... X-Git-Url: https://source.tree.se/git?p=treecutter.git;a=commitdiff_plain;h=15abc562bf6ca5150b215850ea12fe4c92274c8e Adding omit_xml_declaration=True to amara call, but does not yet work, considering to move to lxml or similar. --- diff --git a/src/tree-cutter.py b/src/tree-cutter.py index ae7c2cb..4ca4809 100755 --- a/src/tree-cutter.py +++ b/src/tree-cutter.py @@ -149,7 +149,7 @@ class Page(): infile = os.path.basename(tempfile.mktemp()) outfile = tempfile.mktemp() tfi = open(infile,'w') - tfi.write(self._doc.xml_encode()) + tfi.write(self._doc.xml_encode(omit_xml_declaration=True)) tfi.close() # cmd = ["saxon-xslt-xinclude","-o",outfile,infile,style_xslt] cmd = ["xsltproc","--xinclude","--output",outfile,style_xslt,infile]