Mercurial > hg > documentViewer
changeset 449:6c11f3ec8698
*** empty log message ***
author | abukhman |
---|---|
date | Wed, 31 Aug 2011 15:55:17 +0200 |
parents | 35e7ea6f2368 |
children | 3029dac78754 |
files | MpdlXmlTextServer.py documentViewer.py |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MpdlXmlTextServer.py Fri Jul 29 12:33:17 2011 +0200 +++ b/MpdlXmlTextServer.py Wed Aug 31 15:55:17 2011 +0200 @@ -198,6 +198,7 @@ highlightQuery = pageinfo['highlightQuery'] #mode = pageinfo ['viewMode'] tocMode = pageinfo['tocMode'] + xpointer = pageinfo['xpointer'] characterNormalization=pageinfo['characterNormalization'] tocPN = pageinfo['tocPN'] selfurl = self.absolute_url() @@ -206,7 +207,7 @@ else: textmode = mode - textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s"%(docpath,textmode,pn,characterNormalization) + textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s&options=withXmlNodeId&xpointer=%s"%(docpath,textmode,pn,characterNormalization, xpointer) if highlightQuery is not None: #textParam +="&highlightQuery=%s&sn=%s"%(urllib.quote(highlightQuery),sn) textParam +="&highlightQuery=%s&s=%s&highlightElement=%s&highlightElementPos=%s"%(urllib.quote(highlightQuery),s, highlightElement, highlightElementPos) @@ -319,6 +320,7 @@ href= hrefNode.nodeValue if href.startswith('#note-'): hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=text&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,tocMode,tocPN,pn)) + #if href.startswith(): return serializeNode(pagenode) if mode == "xml": # first div contains text
--- a/documentViewer.py Fri Jul 29 12:33:17 2011 +0200 +++ b/documentViewer.py Wed Aug 31 15:55:17 2011 +0200 @@ -919,6 +919,7 @@ pageinfo ['highlightElementPos'] = self.REQUEST.get('highlightElementPos','') pageinfo ['highlightElement'] = self.REQUEST.get('highlightElement','') + pageinfo ['xpointer'] = self.REQUEST.get('xpointer','') pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30') pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10')