Changeset 307:ec5e920a61e6 in documentViewer
- Timestamp:
- Oct 15, 2010, 9:58:12 AM (15 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r306 r307 157 157 href= hrefNode.nodeValue 158 158 hrefList.append(href) 159 myList = ",".join(hrefList) 160 return myList 161 162 163 def getAllGisPlaces (self, docinfo=None, pageinfo=None): 164 """Show all Gis Places of whole Book """ 165 xpath ='//echo:place' 166 docpath =docinfo['textURLPath'] 167 url = docinfo['url'] 168 selfurl =self.absolute_url() 169 pn =pageinfo['current'] 170 hrefList=[] 171 myList="" 172 text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'],xpath)) 173 dom =Parse(text) 174 result = dom.xpath("//result/resultPage/place") 175 for l in result: 176 hrefNode = l.getAttributeNodeNS(None, u"id") 177 href= hrefNode.nodeValue 178 hrefList.append(href) 159 179 myList = ",".join(hrefList) 160 #hoho =hrefList.replace('','') 161 #probe =href.replace('chinagis_REST/REST/db/chgis/mpdl','chinagis/REST/db/mpdl/%s'%name) 162 #l.setAttributeNS(None, 'target', '_blank') 163 logging.debug("getGisPlaces :%s"%(myList)) 164 return myList 180 return myList 165 181 166 182 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): -
documentViewer.py
r256 r307 188 188 189 189 def getGisPlaces(self, **args): 190 """get search"""190 """get gis places""" 191 191 return self.template.fulltextclient.getGisPlaces(**args) 192 192 193 def getAllGisPlaces(self, **args): 194 """get all gis places""" 195 return self.template.fulltextclient.getGisPlaces(**args) 196 193 197 def getNumPages(self, docinfo): 194 198 """get numpages"""
Note: See TracChangeset
for help on using the changeset viewer.