Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 272:7a52ace035e6
*** empty log message ***
author | abukhman |
---|---|
date | Thu, 14 Oct 2010 11:26:23 +0200 |
parents | fb13d8054a23 |
children | 5b483495dbe4 |
comparison
equal
deleted
inserted
replaced
271:fb13d8054a23 | 272:7a52ace035e6 |
---|---|
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)) | 154 #logging.debug("getGisPlaces (place) result:%s"%(result)) |
155 for l in result: | 155 for l in result: |
156 hrefNode= l.getAttributeNodeNS(None, u"id") | 156 hrefNode= l.getAttributeNodeNS(None, u"id") |
157 logging.debug("documentViewer getGisPlaces (characterNormalization) l:%s"%(l)) | 157 #logging.debug("documentViewer getGisPlaces (characterNormalization) l:%s"%(l)) |
158 if hrefNode: | 158 href= hrefNode.nodeValue |
159 href= hrefNode.nodeValue | |
160 #if href.startswith('id='): | 159 #if href.startswith('id='): |
161 #hrefNode.nodeValue = href.replace('id=',"?") | 160 #hrefNode.nodeValue = href.replace('id=',"?") |
162 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) | 161 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) |
163 logging.debug("documentViewer getGisPlaces (characterNormalization) href:%s"%(href)) | 162 logging.debug("getGisPlaces :%s"%(href)) |
164 return serializeNode(href) | 163 return serializeNode(href) |
165 | 164 |
166 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): | 165 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): |
167 """returns single page from fulltext""" | 166 """returns single page from fulltext""" |
168 docpath = docinfo['textURLPath'] | 167 docpath = docinfo['textURLPath'] |