From 265876d8ab4baf21e27381a6d37ac41518314095 Mon Sep 17 00:00:00 2001 From: Fredrik Unger Date: Sun, 10 Apr 2011 15:44:53 +0200 Subject: [PATCH] Adjusted references to doc to self._doc. --- src/tree-cutter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tree-cutter.py b/src/tree-cutter.py index 28b8669..2697254 100755 --- a/src/tree-cutter.py +++ b/src/tree-cutter.py @@ -84,9 +84,9 @@ class Page(): def prepare(self): self._doc = bindery.parse(self._file, prefixes=PREFIXES) if self._doc.xml_select(u'/db:article/db:info/db:title'): - self._title = unicode(doc.article.info.title) + self._title = unicode(self._doc.article.info.title) if self._doc.xml_select(u'/db:article/db:info/db:titleabbrev'): - self._menu = unicode(doc.article.info.titleabbrev) + self._menu = unicode(self._doc.article.info.titleabbrev) dirname = os.path.dirname(self._file) code = self._doc.xml_select(u"//xi:include[@parse='text']") @@ -120,7 +120,7 @@ class Page(): infile = os.path.basename(tempfile.mktemp()) outfile = tempfile.mktemp() tfi = open(infile,'w') - tfi.write(doc.xml_encode()) + tfi.write(self._doc.xml_encode()) tfi.close() # cmd = ["saxon-xslt-xinclude","-o",outfile,infile,style_xslt] cmd = ["xsltproc","--xinclude","--output",outfile,style_xslt,infile] -- 2.30.2