# HG changeset patch # User abukhman # Date 1289307006 -3600 # Node ID d3bd3c2674ee4cf012a797cfe4388b7b12cf3e40 # Parent 79570b30b7cb31a8fb81e851bdabbecaa5bba838 *** empty log message *** diff -r 79570b30b7cb -r d3bd3c2674ee MpdlXmlTextServer.py --- 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):