Changeset 108:726a71254086 in documentViewer


Ignore:
Timestamp:
May 21, 2010, 9:33:44 AM (14 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r107 r108  
    666666        pageinfo['queryType'] = self.REQUEST.get('queryType',' ')
    667667        pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext')
    668        
     668        pageinfo['sn'] = self.REQUEST.get('sn','')
    669669        pageinfo['textPN'] = self.REQUEST.get('textPN','1')
    670670        pageinfo['highlightQuery'] = self.REQUEST.get('highlightQuery','')
     
    786786        return docinfo
    787787       
    788     def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None,):
     788    def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None):
    789789        """returns single page from fulltext"""
    790790        docpath = docinfo['textURLPath']
     791        #pageinfo = pageinfo['highlightQuery']
    791792        if mode == "text_dict":
    792793            textmode = "textPollux"
     
    799800        #tocPN = pageinfo['tocPN']
    800801 
    801         pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn), outputUnicode=False)
     802        pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", "document=%s&mode=%s&pn=%s&highlightQuery=%s&sn=%s"%(docpath,textmode,pn,highlightQuery,sn), outputUnicode=False)
     803        logging.debug("documentViewer (gettoc) document=%s&mode=%s&pn=%s&highlightQuery=%s"%(docpath,textmode,pn,highlightQuery))
    802804        # post-processing downloaded xml
    803805        pagedom = Parse(pagexml)
Note: See TracChangeset for help on using the changeset viewer.