Changeset 236:ccdce5aca47b in documentViewer


Ignore:
Timestamp:
Oct 11, 2010, 1:58:31 PM (14 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MpdlXmlTextServer.py

    r233 r236  
    146146        text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath))
    147147        pagedom = Parse(text)
    148         result =pagedom.xpath("//result/resultPage/place")
     148        result =pagedom.xpath("//result/resultPage/")
     149        for l in result:
     150            hrefNode= l.getAttributeNodeNS(None, u"id")
    149151        docinfo['place']=getTextFromNode(result[0])
    150152        return docinfo
     
    155157        path = docinfo['textURLPath']
    156158        url = docinfo['url']
    157         name = docinfo['name']
     159        nameR = docinfo['name']
    158160        viewMode= pageinfo['viewMode']
    159161        tocMode = pageinfo['tocMode']
     
    205207                          href=hrefNode.nodeValue
    206208                          if href.startswith('http://chinagis.mpiwg-berlin.mpg.de'):
    207                               hrefNode.nodeValue =href.replace('chinagis_REST/REST/db/chgis/mpdl','chinagis/REST/db/mpdl/'%name)
     209                              hrefNode.nodeValue =href.replace('chinagis_REST/REST/db/chgis/mpdl','chinagis/REST/db/mpdl/'%nameR)
    208210                             #hrefNode.nodeValue =href.replace('chinagis_REST/REST/db/chgis/mpdl','chinagis/REST/db/mpdl%s'%url)
    209211                              l.setAttributeNS(None, 'target', '_blank')
Note: See TracChangeset for help on using the changeset viewer.