Changeset 411:691f0c341b33 in documentViewer


Ignore:
Timestamp:
Dec 6, 2010, 10:41:55 AM (14 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MpdlXmlTextServer.py

    r409 r411  
    215215        dom =Parse(text)
    216216        pagedivs = dom.xpath("//div[@class='pageNumberOrig']")
    217         logging.debug("YYYYYYpagedivs :%s"%(pagedivs))
    218217        if len(pagedivs)>0:
    219218            originalPage= getTextFromNode(pagedivs[0])
     
    221220            return originalPage
    222221   
    223    
     222    def getAllPlaces (self, docinfo=None, pageinfo=None):
     223        """Show all Places if no places than 0"""
     224        docpath = docinfo['textURLPath']
     225        selfurl = self.absolute_url()   
     226        viewMode=  pageinfo['viewMode']
     227        text = self.getServerData("page-fragment.xql","document=%s&mode=%s"%(docinfo['textURLPath'], 'text'))
     228        dom =Parse(text)
     229        pagedivs = dom.xpath("//div[@class='countPlaces']")
     230        logging.debug ("pagedivs=%s"%(pagedivs))
     231        #originalPage= getTextFromNode(pagedivs[0])
     232        #return allPlaces
     233        if len(pagedivs)>0:
     234            originalPage= getTextFromNode(pagedivs[0])
     235            #return docinfo['originalPage']
     236            return originalPage
     237           
    224238    def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization="regPlusNorm", highlightQuery=None, sn=None, optionToggle=None):
    225239        """returns single page from fulltext"""
Note: See TracChangeset for help on using the changeset viewer.