--- documentViewer/documentViewer.py 2010/05/20 09:28:36 1.55 +++ documentViewer/documentViewer.py 2010/05/21 09:44:29 1.58 @@ -659,13 +659,13 @@ class documentViewer(Folder): if np % grpsize > 0: pageinfo['numgroups'] += 1 - + #pageinfo['viewMode'] = viewMode pageinfo['viewMode'] = viewMode pageinfo['tocMode'] = tocMode 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') @@ -706,8 +706,8 @@ class documentViewer(Folder): tocMode = pageinfo['tocMode'] tocPN = pageinfo['tocPN'] selfurl = self.absolute_url() - logging.debug("documentViewer (gettoc) /mpdl/interface/doc-query.xql?document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode)) - page=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode) ,outputUnicode=False) + # logging.debug("documentViewer (gettoc) /mpdl/interface/doc-query.xql?document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode)) + page=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s&highlightQuery=%s"%(docpath, 'text', queryType, query, pagesize, pn, sn, viewMode,highlightQuery) ,outputUnicode=False) pagexml = page.replace('?document=%s'%str(docpath),'?url=%s'%url) pagedom = Parse(pagexml) if (queryType=="fulltext")or(queryType=="xpath")or(queryType=="xquery")or(queryType=="fulltextMorphLemma"): @@ -726,7 +726,7 @@ class documentViewer(Folder): hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl) l.setAttributeNS(None, "onClick", "id='highlighting'") logging.debug("documentViewer (gettoc) highlightQuery: %s"%(highlightQuery)) - l.setAttributeNS(None, "highlightQuery", "id='highlighting'") + l.setAttributeNS(None, highlightQuery, "id='highlighting'") return serializeNode(pagenode) if (queryType=="fulltextMorph"): @@ -785,9 +785,10 @@ class documentViewer(Folder): docinfo['numPages'] = text.count("