changeset 343:025e53924ec3

*** empty log message ***
author abukhman
date Mon, 18 Oct 2010 12:26:39 +0200
parents 259660db1921
children 3be4180e7b23
files MpdlXmlTextServer.py documentViewer.py
diffstat 2 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Mon Oct 18 12:16:49 2010 +0200
+++ b/MpdlXmlTextServer.py	Mon Oct 18 12:26:39 2010 +0200
@@ -178,22 +178,23 @@
             logging.debug("getALLGisPlaces :%s"%(myList))
         return myList
     
-    def getOrigPages (self, docinfo=None,pageinfo=None):
+    def getOrigPages (self, docinfo=None):
         """Show original page """
         #docpath = docinfo['textURLPath'] 
         #url = docinfo['url']
         selfurl = self.absolute_url()
-        pn =pageinfo['current']
+        #pn =pageinfo['current']
        
         viewMode=  pageinfo['viewMode']
-        text = self.getServerData("page-fragment.xql","document=%s&mode=%s&pn=%s"%(docinfo['textURLPath'], 'text',  pn))
+        #text = self.getServerData("page-fragment.xql","document=%s&mode=%s&pn=%s"%(docinfo['textURLPath'], 'text',  pn))
+        text = self.getServerData("page-fragment.xql","document=%s&mode=%s"%(docinfo['textURLPath'], 'text'))
         dom =Parse(text)
         pagedivs = dom.xpath("//div[@class='pageNumberOrig']")
         if len(pagedivs)>0:
-            originalPage = getTextFromNode(pagedivs[0])
-            #return docinfo['originalPage']
-            return originalPage
-            #return docinfo
+            docinfo['originalPage'] = getTextFromNode(pagedivs[0])
+        #return docinfo['originalPage']
+        #return originalPage
+        return docinfo
         
     def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""):
         """returns single page from fulltext"""
--- a/documentViewer.py	Mon Oct 18 12:16:49 2010 +0200
+++ b/documentViewer.py	Mon Oct 18 12:26:39 2010 +0200
@@ -662,7 +662,7 @@
         presentationUrls = dom.xpath("//texttool/presentation")
         docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get info von bib tag
         docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom)
-        #docinfo =self.getOrigPages(docinfo=docinfo)
+        docinfo =self.getOrigPages(docinfo=docinfo)
         
         if presentationUrls and (len(presentationUrls) > 0): # ueberschreibe diese durch presentation informationen 
              # presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten