Changeset 190:c92e6b923913 in documentViewer
- Timestamp:
- Oct 5, 2010, 9:20:51 AM (15 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r189 r190 123 123 if 'numPages' in docinfo: 124 124 # already there 125 return docinfo 126 125 return docinfo 127 126 xquery = '//pb' 128 127 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))130 128 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 131 139 return docinfo 132 140
Note: See TracChangeset
for help on using the changeset viewer.