projects
/
treecutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7cb8343
)
Adjusted references to doc to self._doc.
author
Fredrik Unger
<fred@tree.se>
Sun, 10 Apr 2011 13:44:53 +0000
(15:44 +0200)
committer
Fredrik Unger
<fred@tree.se>
Sun, 10 Apr 2011 13:44:53 +0000
(15:44 +0200)
src/tree-cutter.py
patch
|
blob
|
history
diff --git
a/src/tree-cutter.py
b/src/tree-cutter.py
index 28b8669ed8efe115609d2979d11703952146b6d4..26972544ebb5a90228bfaa18f6fa9e66dd715acf 100755
(executable)
--- 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'):
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'):
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']")
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')
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]
tfi.close()
# cmd = ["saxon-xslt-xinclude","-o",outfile,infile,style_xslt]
cmd = ["xsltproc","--xinclude","--output",outfile,style_xslt,infile]