Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 241:8346c1eb67b3
*** empty log message ***
author | abukhman |
---|---|
date | Mon, 11 Oct 2010 16:44:09 +0200 |
parents | 7ed49e7a7edc |
children | 14d39c85d992 |
comparison
equal
deleted
inserted
replaced
240:7ed49e7a7edc | 241:8346c1eb67b3 |
---|---|
146 text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) | 146 text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) |
147 pagedom = Parse(text) | 147 pagedom = Parse(text) |
148 result =pagedom.xpath("//result/resultPage/") | 148 result =pagedom.xpath("//result/resultPage/") |
149 for l in result: | 149 for l in result: |
150 hrefNode= l.getAttributeNodeNS(None, u"place") | 150 hrefNode= l.getAttributeNodeNS(None, u"place") |
151 logging.debug("YYYY hrefNode%s"%hrefNode) | |
151 if hrefNode: | 152 if hrefNode: |
152 href= hrefNode.nodeValue | 153 href= hrefNode.nodeValue |
153 if href.startswith('id='): | 154 if href.startswith('id='): |
154 hrefNode.nodeValue = href.replace('id=',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%sid="%(url,viewMode,tocMode,tocPN,pn)) | 155 hrefNode.nodeValue = href.replace('id=',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%sid="%(url,viewMode,tocMode,tocPN,pn)) |
155 logging.debug("YYYY href%s"%href) | 156 logging.debug("YYYY href%s"%href) |