Diff for /documentViewer/MpdlXmlTextServer.py between versions 1.21 and 1.26

version 1.21, 2010/08/24 12:11:26 version 1.26, 2010/08/24 14:04:21
Line 52  class MpdlXmlTextServer(SimpleItem): Line 52  class MpdlXmlTextServer(SimpleItem):
         queryType =pageinfo['queryType']          queryType =pageinfo['queryType']
         viewMode=  pageinfo['viewMode']          viewMode=  pageinfo['viewMode']
         tocMode = pageinfo['tocMode']          tocMode = pageinfo['tocMode']
         #characterNormalization = pageinfo ['characterNormalization']          characterNormalization = pageinfo['characterNormalization']
         tocPN = pageinfo['tocPN']          tocPN = pageinfo['tocPN']
         selfurl = self.absolute_url()          selfurl = self.absolute_url()
                   
Line 130  class MpdlXmlTextServer(SimpleItem): Line 130  class MpdlXmlTextServer(SimpleItem):
         docinfo['numPages'] = text.count("<pb ")          docinfo['numPages'] = text.count("<pb ")
         return docinfo          return docinfo
                 
     def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=None):      def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""):
         """returns single page from fulltext"""          """returns single page from fulltext"""
         docpath = docinfo['textURLPath']          docpath = docinfo['textURLPath']
         path = docinfo['textURLPath']          path = docinfo['textURLPath']
Line 145  class MpdlXmlTextServer(SimpleItem): Line 145  class MpdlXmlTextServer(SimpleItem):
         else:          else:
             textmode = mode              textmode = mode
         #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))          #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
         textParam = "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn)          textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s"%(docpath,textmode,pn,characterNormalization)
         if highlightQuery is not None:          if highlightQuery is not None:
             textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn)                         textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn)           
                   
Line 306  class MpdlXmlTextServer(SimpleItem): Line 306  class MpdlXmlTextServer(SimpleItem):
         tocMode = pageinfo['tocMode']          tocMode = pageinfo['tocMode']
         tocPN = pageinfo['tocPN']            tocPN = pageinfo['tocPN']  
                   
         data = self.getServerData("doc-query.xql","document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath,queryType, pagesize, pn))            data = self.getServerData("doc-query.xql","document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s&characterNormalization=%s"%(docpath,queryType, pagesize, pn,characterNormalization))  
         page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&characterNormalization=%s'%(selfurl,url, viewMode, tocMode, tocPN,characterNormalization))          page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s'%(selfurl,url, viewMode, tocMode, tocPN))
         text = page.replace('mode=image','mode=texttool')          text = page.replace('mode=image','mode=texttool')
         logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))          logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization))
         #logging.debug("documentViewer (characterNormalization) text: %s"%(text))          #logging.debug("documentViewer (characterNormalization) text: %s"%(text))

Removed from v.1.21  
changed lines
  Added in v.1.26


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>