Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 254:4b13f2e54665
*** empty log message ***
author | abukhman |
---|---|
date | Wed, 13 Oct 2010 17:16:01 +0200 |
parents | d6ca167ccb1a |
children | ce129cc3e031 |
comparison
equal
deleted
inserted
replaced
253:d6ca167ccb1a | 254:4b13f2e54665 |
---|---|
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=None, pageinfo=None): | 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'] | 146 docpath = docinfo['textURLPath'] |
147 url = docinfo['url'] | 147 url = docinfo['url'] |
148 selfurl = self.absolute_url() | 148 selfurl = self.absolute_url() |
149 | 149 |
150 text=self.getServerData("xpath.xql", "document=%s&xpath='//place'%s&pn=%s"%(docinfo['textURLPath'],pn)) | 150 text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'],'//place',pn)) |
151 logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) | 151 logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) |
152 pagedom = Parse(text) | 152 pagedom = Parse(text) |
153 result =pagedom.xpath("//result/resultPage/*") | 153 result =pagedom.xpath("//result/resultPage/*") |
154 for l in result: | 154 for l in result: |
155 hrefNode= l.getAttributeNodeNS(None, u"id") | 155 hrefNode= l.getAttributeNodeNS(None, u"id") |