Changeset 207:0f6a377679d5 in documentViewer


Ignore:
Timestamp:
Oct 8, 2010, 11:58:15 AM (14 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MpdlXmlTextServer.py

    r206 r207  
    119119        return "no text here"   
    120120                       
    121     def getNumPages(self, docinfo):
    122         """get list of pages from fulltext and put in docinfo"""
     121    """def getNumPages(self, docinfo):
     122        ""get list of pages from fulltext and put in docinfo""
    123123        if 'numPages' in docinfo:
    124124            # already there
     
    128128        docinfo['numPages'] = text.count("<pb ")
    129129        return docinfo
    130      
     130     """
    131131    def getNumTextPages (self, docinfo):
    132132        """get list of pages from fulltext (texts without images) and put in docinfo"""
     
    140140        docinfo['numPages']=int(getTextFromNode(result[0]))
    141141        return docinfo
    142        
     142   
     143    def getGisPlases(self, docinfo):
     144        """ Show all Gis Places of whole Page"""
     145        xpath='//place'
     146        text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath))
     147        pagedom = Parse(text)
     148        result =pagedom.xpath("//result/resultPage/place")
     149        docinfo['place']=getTextFromNode(result[0])
     150        return docinfo
     151   
    143152    def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""):
    144153        """returns single page from fulltext"""
     
    196205                          if href.startswith('http://chinagis.mpiwg-berlin.mpg.de'):
    197206                              hrefNode.nodeValue =href.replace('chinagis_REST','chinagis')
     207                              hrefNode.nodeValue=href.replace('chgis','')
    198208                              l.setAttributeNS(None, 'target', '_blank')
    199209                  return serializeNode(pagenode)
Note: See TracChangeset for help on using the changeset viewer.