Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 276:7ea93dafdf6d
*** empty log message ***
author | abukhman |
---|---|
date | Thu, 14 Oct 2010 12:03:06 +0200 |
parents | 43fc3187edd1 |
children | b39fb81a1919 |
comparison
equal
deleted
inserted
replaced
275:43fc3187edd1 | 276:7ea93dafdf6d |
---|---|
152 dom = Parse(text) | 152 dom = Parse(text) |
153 result = dom.xpath("//result/resultPage/place") | 153 result = dom.xpath("//result/resultPage/place") |
154 for l in result: | 154 for l in result: |
155 hrefNode= l.getAttributeNodeNS(None, u"id") | 155 hrefNode= l.getAttributeNodeNS(None, u"id") |
156 href= hrefNode.nodeValue | 156 href= hrefNode.nodeValue |
157 for l in href: | 157 #koka=href |
158 logging.debug("getGisPlaces :%s"%(href)) | 158 #logging.debug("getGisPlaces :%s"%(href)) |
159 #if href.startswith('id='): | 159 #if href.startswith('id='): |
160 #hrefNode.nodeValue = href.replace('id=',"?") | 160 #hrefNode.nodeValue = href.replace('id=',"?") |
161 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) | 161 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) |
162 #logging.debug("getGisPlaces :%s"%(href)) | 162 logging.debug("getGisPlaces :%s"%(serializeNode(href))) |
163 return serializeNode(href) | 163 return serializeNode(href) |
164 | 164 |
165 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=""): |
166 """returns single page from fulltext""" | 166 """returns single page from fulltext""" |
167 docpath = docinfo['textURLPath'] | 167 docpath = docinfo['textURLPath'] |