comparison MpdlXmlTextServer.py @ 451:91daab0c219b

*** empty log message ***
author abukhman
date Wed, 28 Sep 2011 15:39:28 +0200
parents 3029dac78754
children 67095296c95a
comparison
equal deleted inserted replaced
450:3029dac78754 451:91daab0c219b
337 links =pagenode.xpath("//a") 337 links =pagenode.xpath("//a")
338 for l in links: 338 for l in links:
339 hrefNode =l.getAttributeNodeNS(None, u"href") 339 hrefNode =l.getAttributeNodeNS(None, u"href")
340 if hrefNode: 340 if hrefNode:
341 href=hrefNode.nodeValue 341 href=hrefNode.nodeValue
342 if href.startswith('http://chinagis.mpiwg-berlin.mpg.de'): 342 if href.startswith('http://mappit.mpiwg-berlin.mpg.de'):
343 hrefNode.nodeValue =href.replace('chinagis_REST/REST/db/chgis/mpdl','chinagis/REST/db/mpdl/%s'%name) 343 hrefNode.nodeValue =href.replace('db/REST/db/chgis/mpdl','db/RESTdb/db/mpdl/%s'%name)
344 l.setAttributeNS(None, 'target', '_blank') 344 l.setAttributeNS(None, 'target', '_blank')
345 return serializeNode(pagenode) 345 return serializeNode(pagenode)
346 346
347 if mode == "pureXml": 347 if mode == "pureXml":
348 # first div contains text 348 # first div contains text