comparison MpdlXmlTextServer.py @ 243:4b5e3cdb9d02

*** empty log message ***
author abukhman
date Mon, 11 Oct 2010 17:03:17 +0200
parents 14d39c85d992
children 7f089a0cb189
comparison
equal deleted inserted replaced
242:14d39c85d992 243:4b5e3cdb9d02
141 return docinfo 141 return docinfo
142 142
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"%(docinfo['textURLPath'], xpath)) 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 logging.debug("YYYY result%s"%result)
150 for l in result: 149 for l in result:
151 hrefNode= l.getAttributeNodeNS(None, u"place") 150 hrefNode= l.getAttributeNodeNS(None, u"place")
152 logging.debug("YYYY hrefNode%s"%hrefNode)
153 if hrefNode: 151 if hrefNode:
154 href= hrefNode.nodeValue 152 href= hrefNode.nodeValue
155 if href.startswith('id='): 153 if href.startswith('id='):
156 hrefNode.nodeValue = href.replace('id=',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%sid="%(url,viewMode,tocMode,tocPN,pn)) 154 hrefNode.nodeValue = href.replace('id=',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%sid="%(url,viewMode,tocMode,tocPN,pn))
157 logging.debug("YYYY href%s"%href) 155 logging.debug("YYYY href%s"%href)