Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 274:705762e121ca
*** empty log message ***
author | abukhman |
---|---|
date | Thu, 14 Oct 2010 11:46:07 +0200 |
parents | 5b483495dbe4 |
children | 43fc3187edd1 |
comparison
equal
deleted
inserted
replaced
273:5b483495dbe4 | 274:705762e121ca |
---|---|
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 koko=len(href) | 157 |
158 #if href.startswith('id='): | 158 #if href.startswith('id='): |
159 #hrefNode.nodeValue = href.replace('id=',"?") | 159 #hrefNode.nodeValue = href.replace('id=',"?") |
160 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) | 160 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) |
161 logging.debug("getGisPlaces :%s"%(koko)) | 161 logging.debug("getGisPlaces :%s"%(href[0])) |
162 return serializeNode(href) | 162 return serializeNode(href) |
163 | 163 |
164 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=""): |
165 """returns single page from fulltext""" | 165 """returns single page from fulltext""" |
166 docpath = docinfo['textURLPath'] | 166 docpath = docinfo['textURLPath'] |