Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 253:d6ca167ccb1a
*** empty log message ***
author | abukhman |
---|---|
date | Wed, 13 Oct 2010 17:10:25 +0200 |
parents | 9de9d301743c |
children | 4b13f2e54665 |
comparison
equal
deleted
inserted
replaced
252:9de9d301743c | 253:d6ca167ccb1a |
---|---|
138 dom = Parse(text) | 138 dom = Parse(text) |
139 result= dom.xpath("//result/resultPage") | 139 result= dom.xpath("//result/resultPage") |
140 docinfo['numPages']=int(getTextFromNode(result[0])) | 140 docinfo['numPages']=int(getTextFromNode(result[0])) |
141 return docinfo | 141 return docinfo |
142 | 142 |
143 def getGisPlaces(self, docinfo): | 143 def getGisPlaces(self, docinfo=None, pageinfo=None): |
144 """ Show all Gis Places of whole Page""" | 144 """ Show all Gis Places of whole Page""" |
145 #xpath='//place' | 145 #xpath='//place' |
146 docpath = docinfo['textURLPath'] | |
147 url = docinfo['url'] | |
148 selfurl = self.absolute_url() | |
149 | |
146 text=self.getServerData("xpath.xql", "document=%s&xpath='//place'%s&pn=%s"%(docinfo['textURLPath'],pn)) | 150 text=self.getServerData("xpath.xql", "document=%s&xpath='//place'%s&pn=%s"%(docinfo['textURLPath'],pn)) |
147 logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) | 151 logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) |
148 pagedom = Parse(text) | 152 pagedom = Parse(text) |
149 result =pagedom.xpath("//result/resultPage/*") | 153 result =pagedom.xpath("//result/resultPage/*") |
150 for l in result: | 154 for l in result: |