comparison documentViewer.py @ 452:8019b5360508

hack for annalen
author dwinter
date Wed, 04 Jan 2012 08:38:17 +0100
parents 6c11f3ec8698
children 67095296c95a
comparison
equal deleted inserted replaced
451:91daab0c219b 452:8019b5360508
775 # fix URLs starting with /mpiwg/online 775 # fix URLs starting with /mpiwg/online
776 if textUrl.startswith("/mpiwg/online"): 776 if textUrl.startswith("/mpiwg/online"):
777 textUrl = textUrl.replace("/mpiwg/online", '', 1) 777 textUrl = textUrl.replace("/mpiwg/online", '', 1)
778 778
779 docinfo['textURL'] = textUrl 779 docinfo['textURL'] = textUrl
780 780
781
782 #TODO: hack-DW for annalen
783 if (textUrl is not None) and (textUrl.startswith("/permanent/einstein/annalen")):
784 textUrl=textUrl.replace("/permanent/einstein/annalen/","/diverse/de/")
785 splitted=textUrl.split("/fulltext")
786 textUrl=splitted[0]+".xml"
787 textUrlkurz = string.split(textUrl, ".")[0]
788 docinfo['textURLPathkurz'] = textUrlkurz
789 docinfo['textURLPath'] = textUrl
790 logging.debug("hack")
791 logging.debug(textUrl)
792
793
781 # new style text-url-path 794 # new style text-url-path
782 textUrls = dom.xpath("//texttool/text-url-path") 795 textUrls = dom.xpath("//texttool/text-url-path")
783 if textUrls and (len(textUrls) > 0): 796 if textUrls and (len(textUrls) > 0):
784 textUrl = getTextFromNode(textUrls[0]) 797 textUrl = getTextFromNode(textUrls[0])
785 docinfo['textURLPath'] = textUrl 798 docinfo['textURLPath'] = textUrl