Mercurial > hg > documentViewer
changeset 108:726a71254086
*** empty log message ***
author | abukhman |
---|---|
date | Fri, 21 May 2010 11:33:44 +0200 |
parents | 53c395d3175f |
children | 7a2a2d53c021 |
files | documentViewer.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/documentViewer.py Thu May 20 16:19:31 2010 +0200 +++ b/documentViewer.py Fri May 21 11:33:44 2010 +0200 @@ -665,7 +665,7 @@ pageinfo['query'] = self.REQUEST.get('query',' ') pageinfo['queryType'] = self.REQUEST.get('queryType',' ') pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext') - + pageinfo['sn'] = self.REQUEST.get('sn','') pageinfo['textPN'] = self.REQUEST.get('textPN','1') pageinfo['highlightQuery'] = self.REQUEST.get('highlightQuery','') pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30') @@ -785,9 +785,10 @@ docinfo['numPages'] = text.count("<pb ") return docinfo - def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None,): + def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None): """returns single page from fulltext""" docpath = docinfo['textURLPath'] + #pageinfo = pageinfo['highlightQuery'] if mode == "text_dict": textmode = "textPollux" else: @@ -798,7 +799,8 @@ #tocMode = pageinfo['tocMode'] #tocPN = pageinfo['tocPN'] - pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn), outputUnicode=False) + 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) + logging.debug("documentViewer (gettoc) document=%s&mode=%s&pn=%s&highlightQuery=%s"%(docpath,textmode,pn,highlightQuery)) # post-processing downloaded xml pagedom = Parse(pagexml) # plain text mode