changeset 201:1eb52dc59d38

*** empty log message ***
author abukhman
date Tue, 05 Oct 2010 14:13:11 +0200
parents 8301df01ac5a
children fe98a8867edb
files MpdlXmlTextServer.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Tue Oct 05 14:03:02 2010 +0200
+++ b/MpdlXmlTextServer.py	Tue Oct 05 14:13:11 2010 +0200
@@ -138,8 +138,10 @@
         logging.debug("documentViewer (text) text: %s"%(text))
         #docinfo['numPages']=text('resultPage')
         pagedom = Parse(text)
-        docinfo['numPages']= pagedom.resultPage("resultPage")
-        logging.debug("documentViewer (characterNormalization) docinfo['numPages']: %s"%(docinfo['numPages']))
+        
+        result= dom.xpath("//result/resultPage")
+        docinfo['numPages']=int(getTextFromNode(result[0]))
+        #logging.debug("documentViewer (characterNormalization) docinfo['numPages']: %s"%(docinfo['numPages']))
         return docinfo
        
     def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""):