comparison MpdlXmlTextServer.py @ 249:6c6f0614d6d6

*** empty log message ***
author abukhman
date Mon, 11 Oct 2010 17:54:24 +0200
parents 126262957b3d
children 7775d87016b5
comparison
equal deleted inserted replaced
248:126262957b3d 249:6c6f0614d6d6
143 def getGisPlases(self, docinfo): 143 def getGisPlases(self, docinfo):
144 """ Show all Gis Places of whole Page""" 144 """ Show all Gis Places of whole Page"""
145 xpath='//place' 145 xpath='//place'
146 text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'], xpath,pn)) 146 text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'], xpath,pn))
147 pagedom = Parse(text) 147 pagedom = Parse(text)
148 result =pagedom.xpath("//result/resultPage/") 148 result =pagedom.xpath("//result/resultPage")
149 for l in result: 149 for l in result:
150 hrefNode= l.getAttributeNodeNS(None, u"id") 150 hrefNode= l.getAttributeNodeNS(None, u"place")
151 logging.debug("documentViewer (characterNormalization) l: %s"%(l)) 151 logging.debug("documentViewer (characterNormalization) l:%s"%(l))
152 if hrefNode: 152 if hrefNode:
153 href= hrefNode.nodeValue 153 href= hrefNode.nodeValue
154 if href.startswith('id='): 154 if href.startswith('id='):
155 hrefNode.nodeValue = href.replace('id=',"?") 155 hrefNode.nodeValue = href.replace('id=',"?")
156 156