--- documentViewer/MpdlXmlTextServer.py 2010/10/15 13:28:13 1.153 +++ documentViewer/MpdlXmlTextServer.py 2010/10/18 10:26:39 1.170 @@ -178,20 +178,24 @@ class MpdlXmlTextServer(SimpleItem): 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'] + #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) - logging.debug("getOrigPages :%s"%(dom)) pagedivs = dom.xpath("//div[@class='pageNumberOrig']") - logging.debug("getOrigPages :%s"%(pagedivs)) - return "pagedivs" - + if len(pagedivs)>0: + 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""" docpath = docinfo['textURLPath']