Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 287:a19879388623
*** empty log message ***
author | abukhman |
---|---|
date | Thu, 14 Oct 2010 13:50:39 +0200 |
parents | f692e109530b |
children | 6b1de1aa02f8 |
comparison
equal
deleted
inserted
replaced
286:f692e109530b | 287:a19879388623 |
---|---|
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 href.split(",") | 157 |
158 #href = ",".join(href) | 158 #href = ",".join(href) |
159 logging.debug("getGisPlaces :%s"%(href)) | 159 logging.debug("getGisPlaces :%s"%(href)) |
160 return href | |
160 #return ";".join(["%s=%s" % (href, href) for href, href in params.items()]) | 161 #return ";".join(["%s=%s" % (href, href) for href, href in params.items()]) |
161 #logging.debug("getGisPlaces :%s"%(href)) | 162 #logging.debug("getGisPlaces :%s"%(href)) |
162 #if href.startswith('id='): | 163 #if href.startswith('id='): |
163 #hrefNode.nodeValue = href.replace('id=',"?") | 164 #hrefNode.nodeValue = href.replace('id=',"?") |
164 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) | 165 #logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) |
165 logging.debug("getGisPlaces :%s"%(href)) | 166 logging.debug("getGisPlaces :%s"%(href)) |
166 return href | 167 return "no text here" |
167 | 168 |
168 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): | 169 def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): |
169 """returns single page from fulltext""" | 170 """returns single page from fulltext""" |
170 docpath = docinfo['textURLPath'] | 171 docpath = docinfo['textURLPath'] |
171 path = docinfo['textURLPath'] | 172 path = docinfo['textURLPath'] |