Changeset 207:0f6a377679d5 in documentViewer
- Timestamp:
- Oct 8, 2010, 11:58:15 AM (14 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r206 r207 119 119 return "no text here" 120 120 121 def getNumPages(self, docinfo):122 "" "get list of pages from fulltext and put in docinfo"""121 """def getNumPages(self, docinfo): 122 ""get list of pages from fulltext and put in docinfo"" 123 123 if 'numPages' in docinfo: 124 124 # already there … … 128 128 docinfo['numPages'] = text.count("<pb ") 129 129 return docinfo 130 130 """ 131 131 def getNumTextPages (self, docinfo): 132 132 """get list of pages from fulltext (texts without images) and put in docinfo""" … … 140 140 docinfo['numPages']=int(getTextFromNode(result[0])) 141 141 return docinfo 142 142 143 def getGisPlases(self, docinfo): 144 """ Show all Gis Places of whole Page""" 145 xpath='//place' 146 text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) 147 pagedom = Parse(text) 148 result =pagedom.xpath("//result/resultPage/place") 149 docinfo['place']=getTextFromNode(result[0]) 150 return docinfo 151 143 152 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): 144 153 """returns single page from fulltext""" … … 196 205 if href.startswith('http://chinagis.mpiwg-berlin.mpg.de'): 197 206 hrefNode.nodeValue =href.replace('chinagis_REST','chinagis') 207 hrefNode.nodeValue=href.replace('chgis','') 198 208 l.setAttributeNS(None, 'target', '_blank') 199 209 return serializeNode(pagenode)
Note: See TracChangeset
for help on using the changeset viewer.