changeset 402:d3bd3c2674ee

*** empty log message ***
author abukhman
date Tue, 09 Nov 2010 13:50:06 +0100
parents 79570b30b7cb
children a4ad4020ef6a
files MpdlXmlTextServer.py
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Tue Nov 09 13:41:41 2010 +0100
+++ b/MpdlXmlTextServer.py	Tue Nov 09 13:50:06 2010 +0100
@@ -370,8 +370,9 @@
          #pagexml=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath, 'text', queryType, query, pagesize, pn) ,outputUnicode=False)
          pagedom = Parse(pagexml)
          numdivs = pagedom.xpath("//div[@class='queryResultHits']")
-         tocSearch = int(getTextFromNode(numdivs[0]))    
-         return tocSearch
+         tocSearch = int(getTextFromNode(numdivs[0])) 
+         tc=int((tocSearch/10)+1)   
+         return tc
      
     def getQueryResultHitsText(self,  docinfo=None, pageinfo=None):      
          """number of hits in Text of Contents mode"""
@@ -389,8 +390,9 @@
          pagedom = Parse(pagexml)
          logging.debug("documentViewer (pagedom) pagedom: %s"%(pagedom))
          numdivs = pagedom.xpath("//div[@class='queryResultHits']")
-         tocSearch = int(getTextFromNode(numdivs[0]))    
-         return tocSearch 
+         tocSearch = int(getTextFromNode(numdivs[0]))  
+         tc=int((tocSearch/10)+1)  
+         return tc 
 
     def getQueryResultHitsFigures(self,  docinfo=None, pageinfo=None):      
          """number of hits in Text of Figures mode"""
@@ -408,8 +410,9 @@
          pagedom = Parse(pagexml)
          logging.debug("documentViewer (pagedom) pagedom: %s"%(pagedom))
          numdivs = pagedom.xpath("//div[@class='queryResultHits']")
-         tocSearch = int(getTextFromNode(numdivs[0]))    
-         return tocSearch 
+         tocSearch = int(getTextFromNode(numdivs[0]))  
+         tc=int((tocSearch/10)+1)  
+         return tc 
 
 
     def getToc(self, mode="text", docinfo=None):