Changeset 190:c92e6b923913 in documentViewer


Ignore:
Timestamp:
Oct 5, 2010, 9:20:51 AM (14 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MpdlXmlTextServer.py

    r189 r190  
    123123        if 'numPages' in docinfo:
    124124            # already there
    125             return docinfo
    126        
     125            return docinfo       
    127126        xquery = '//pb'
    128127        text = self.getServerData("xquery.xql","document=%s&xquery=%s"%(docinfo['textURLPath'],xquery))
    129         #text = self.template.fulltextclient.eval("/mpdl/interface/xquery.xql", "document=%s&xquery=%s"%(docinfo['textURLPath'],xquery))
    130128        docinfo['numPages'] = text.count("<pb ")
     129        return docinfo
     130     
     131    def getNumTextPages (self, docinfo):
     132        """get list of pages from fulltext (texts without images) and put in docinfo"""
     133        if 'numPages' in docinfo:
     134            # allredy there
     135            return docinfo
     136        xpath ='/count(//pb)'
     137        text=self.getServerData("xpath.xql", "document=%sxpath=%s"%(docinfo['textURLPath'], xpath))
     138        docinfo['numPages']=text.xpath
    131139        return docinfo
    132140       
Note: See TracChangeset for help on using the changeset viewer.