--- documentViewer/MpdlXmlTextServer.py 2010/09/24 13:48:03 1.41 +++ documentViewer/MpdlXmlTextServer.py 2010/10/15 14:06:50 1.159 @@ -42,8 +42,6 @@ class MpdlXmlTextServer(SimpleItem): """get search list""" docpath = docinfo['textURLPath'] url = docinfo['url'] - logging.debug("documentViewer (gettoc) docpath: %s"%(docpath)) - logging.debug("documentViewer (gettoc) url: %s"%(url)) pagesize = pageinfo['queryPageSize'] pn = pageinfo['searchPN'] sn = pageinfo['sn'] @@ -118,23 +116,90 @@ class MpdlXmlTextServer(SimpleItem): return serializeNode(pagenode) return "no text here" - def getNumPages(self, docinfo): - """get list of pages from fulltext and put in docinfo""" + """def getNumPages(self, docinfo): + ""get list of pages from fulltext and put in docinfo"" if 'numPages' in docinfo: # already there - return docinfo - + return docinfo xquery = '//pb' text = self.getServerData("xquery.xql","document=%s&xquery=%s"%(docinfo['textURLPath'],xquery)) - #text = self.template.fulltextclient.eval("/mpdl/interface/xquery.xql", "document=%s&xquery=%s"%(docinfo['textURLPath'],xquery)) docinfo['numPages'] = text.count("