Display xpointer details to simplify debugging.
authorFredrik Unger <fred@tree.se>
Mon, 4 Jun 2012 10:45:48 +0000 (12:45 +0200)
committerFredrik Unger <fred@tree.se>
Mon, 4 Jun 2012 10:45:48 +0000 (12:45 +0200)
If there are several xincludes in a document and several
translations it is hard to find the xinclude call that failed.
Priting the xpointer helps localize the problem.

treecutter/page.py

index e02a03c58f3d8b365fb6fd87904ece3033851a74..1cb2bafe9b19a809b5ea9df334a5bdeb0b82dd97 100644 (file)
@@ -70,7 +70,7 @@ class Page():
                     os.chdir(cwd)
                     xmlblock = str(xml.stdout.read())
                     te = time()
-                    print " [%5.2f s]" % (round(te-ts,2))
+                    print " [%5.2f s]  (%s)" % (round(te-ts,2),c.xpointer)
                     xstr = bindery.parse(xmlblock)
                     idp = c.xml_index_on_parent
                     for x in xstr.xml_children: