# HG changeset patch # User abukhman # Date 1314798917 -7200 # Node ID 6c11f3ec86984479c985b963f3c0686ed0f9935e # Parent 35e7ea6f236817f7374a33c30bb40a4b9d70286a *** empty log message *** diff -r 35e7ea6f2368 -r 6c11f3ec8698 MpdlXmlTextServer.py --- 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 diff -r 35e7ea6f2368 -r 6c11f3ec8698 documentViewer.py --- 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')