changeset 169:21ac9164eedf

characterNormalization
author abukhman
date Tue, 24 Aug 2010 15:15:59 +0200
parents 6f31a7c37914
children caf66e1fccd3
files MpdlXmlTextServer.py documentViewer.py
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Tue Aug 24 14:57:20 2010 +0200
+++ b/MpdlXmlTextServer.py	Tue Aug 24 15:15:59 2010 +0200
@@ -52,7 +52,7 @@
         queryType =pageinfo['queryType']
         viewMode=  pageinfo['viewMode']
         tocMode = pageinfo['tocMode']
-        #characterNormalization = pageinfo ['characterNormalization']
+        characterNormalization = pageinfo['characterNormalization']
         tocPN = pageinfo['tocPN']
         selfurl = self.absolute_url()
         
--- a/documentViewer.py	Tue Aug 24 14:57:20 2010 +0200
+++ b/documentViewer.py	Tue Aug 24 15:15:59 2010 +0200
@@ -226,7 +226,7 @@
         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)
   
     security.declareProtected('View','index_html')
-    def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None):
+    def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None, characterNormalization=None):
         '''
         view it
         @param mode: defines how to access the document behind url 
@@ -259,7 +259,7 @@
             else:
                 viewMode="images"
                 
-        pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo,viewMode=viewMode,tocMode=tocMode)
+        pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo,viewMode=viewMode,tocMode=tocMode,characterNormalization=characterNormalization)
         
         pt = getattr(self.template, 'viewer_main')               
         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,mk=self.generateMarks(mk))
@@ -678,7 +678,7 @@
         self.REQUEST.SESSION['docinfo'] = docinfo
         return docinfo
                
-    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None):
+    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None,characterNormalization=None):
         """returns pageinfo with the given parameters"""
         pageinfo = {}
         current = getInt(current)
@@ -701,7 +701,8 @@
                 pageinfo['numgroups'] += 1        
         pageinfo['viewMode'] = viewMode
         pageinfo['tocMode'] = tocMode
-        pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization',' ')
+        pageinfo['characterNormalization'] =characterNormalization
+        #pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization',' ')
         pageinfo['query'] = self.REQUEST.get('query',' ')
         pageinfo['queryType'] = self.REQUEST.get('queryType',' ')
         pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext')