# HG changeset patch # User abukhman # Date 1286283362 -7200 # Node ID ab1ab4ad4b658160a97cf127f445346f73f19a97 # Parent 1737b7eb79454e40113e4d7513adf0183a0c2079 *** empty log message *** diff -r 1737b7eb7945 -r ab1ab4ad4b65 MpdlXmlTextServer.py --- a/MpdlXmlTextServer.py Tue Oct 05 14:25:32 2010 +0200 +++ b/MpdlXmlTextServer.py Tue Oct 05 14:56:02 2010 +0200 @@ -130,17 +130,17 @@ def getNumTextPages (self, docinfo): """get list of pages from fulltext (texts without images) and put in docinfo""" - if 'numPages' in docinfo: + # if 'numPages' in docinfo: # allredy there - return docinfo - xpath ='/count(//pb)' - text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) - logging.debug("documentViewer (text) text: %s"%(text)) + # return docinfo + # xpath ='/count(//pb)' + # text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) + # logging.debug("documentViewer (text) text: %s"%(text)) #docinfo['numPages']=text('resultPage') - dom = Parse(text) + # dom = Parse(text) - result= dom.xpath("//result/resultPage") - docinfo['numPages']=int(getTextFromNode(result[0])) + # result= dom.xpath("//result/resultPage") + # docinfo['numPages']=int(getTextFromNode(result[0])) #logging.debug("documentViewer (characterNormalization) docinfo['numPages']: %s"%(docinfo['numPages'])) return docinfo diff -r 1737b7eb7945 -r ab1ab4ad4b65 documentViewer.py --- a/documentViewer.py Tue Oct 05 14:25:32 2010 +0200 +++ b/documentViewer.py Tue Oct 05 14:56:02 2010 +0200 @@ -615,7 +615,7 @@ docinfo['textURLPath'] = textUrl if not docinfo['imagePath']: # text-only, no page images - docinfo = self.getTextPages(docinfo) + docinfo = self.getNumPages(docinfo) presentationUrls = dom.xpath("//texttool/presentation") docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom) # get info von bib tag