comparison MpdlXmlTextServer.py @ 185:6fb9a06b8bee

*** empty log message ***
author abukhman
date Fri, 24 Sep 2010 14:22:15 +0200
parents 4e33eeef676e
children 3b3476df97d4
comparison
equal deleted inserted replaced
184:4e33eeef676e 185:6fb9a06b8bee
147 #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization)) 147 #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
148 textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s"%(docpath,textmode,pn,characterNormalization) 148 textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s"%(docpath,textmode,pn,characterNormalization)
149 if highlightQuery is not None: 149 if highlightQuery is not None:
150 textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn) 150 textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn)
151 151
152 pagexml = self.getServerData("page-fragment.xql",urllib.quote(textParam)) 152 pagexml = self.getServerData("page-fragment.xql",textParam)
153 #pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", textParam, outputUnicode=False) 153 #pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", textParam, outputUnicode=False)
154 154
155 pagedom = Parse(pagexml) 155 pagedom = Parse(urllib.quote(pagexml))
156 # plain text mode 156 # plain text mode
157 if mode == "text": 157 if mode == "text":
158 # first div contains text 158 # first div contains text
159 pagedivs = pagedom.xpath("/div") 159 pagedivs = pagedom.xpath("/div")
160 if len(pagedivs) > 0: 160 if len(pagedivs) > 0: