Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 273:5b483495dbe4
*** empty log message ***
author | abukhman |
---|---|
date | Thu, 14 Oct 2010 11:35:01 +0200 |
parents | 7a52ace035e6 |
children | 705762e121ca |
comparison
equal
deleted
inserted
replaced
272:7a52ace035e6 | 273:5b483495dbe4 |
---|---|
149 pn = pageinfo['current'] | 149 pn = pageinfo['current'] |
150 | 150 |
151 text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'],xpath,pn)) | 151 text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'],xpath,pn)) |
152 dom = Parse(text) | 152 dom = Parse(text) |
153 result = dom.xpath("//result/resultPage/place") | 153 result = dom.xpath("//result/resultPage/place") |
154 #logging.debug("getGisPlaces (place) result:%s"%(result)) | |
155 for l in result: | 154 for l in result: |
156 hrefNode= l.getAttributeNodeNS(None, u"id") | 155 hrefNode= l.getAttributeNodeNS(None, u"id") |
157 #logging.debug("documentViewer getGisPlaces (characterNormalization) l:%s"%(l)) | |
158 href= hrefNode.nodeValue | 156 href= hrefNode.nodeValue |
157 koko=len(href) | |
159 #if href.startswith('id='): | 158 #if href.startswith('id='): |
160 #hrefNode.nodeValue = href.replace('id=',"?") | 159 #hrefNode.nodeValue = href.replace('id=',"?") |
161 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) | 160 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) |
162 logging.debug("getGisPlaces :%s"%(href)) | 161 logging.debug("getGisPlaces :%s"%(koko)) |
163 return serializeNode(href) | 162 return serializeNode(href) |
164 | 163 |
165 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): | 164 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): |
166 """returns single page from fulltext""" | 165 """returns single page from fulltext""" |
167 docpath = docinfo['textURLPath'] | 166 docpath = docinfo['textURLPath'] |