--- OSAS/OSA_system/OSAS_Root.py 2004/08/04 18:36:05 1.14 +++ OSAS/OSA_system/OSAS_Root.py 2004/10/29 14:24:32 1.17 @@ -5,6 +5,7 @@ from OFS.Folder import Folder from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplate import PageTemplate import urllib +import zLOG import re import xml.dom.minidom @@ -98,14 +99,16 @@ class OSAS_Root(Folder,Implicit): def downloadExternalXML(self,index_meta_url,xml_url): """lade xml file""" - + #print "GI" + #print xml_url xmlneu=urllib.urlopen(xml_url).read() - + + try: dom=xml.dom.minidom.parseString(xmlneu) except: print "Error" - print xmlneu + return repr(xml_url) return "error" path=re.sub(self.REQUEST['SERVER_URL'],'',index_meta_url) @@ -117,9 +120,11 @@ class OSAS_Root(Folder,Implicit): path=re.sub('http://foxridge.mpiwg-berlin.mpg.de','',path) # falls foxridge als server path=re.sub('http://content.mpiwg-berlin.mpg.de','',path) # falls content als server - + path=re.sub('http://vision.mpiwg-berlin.mpg.de','',path) # falls vision als server + path=re.sub('http://echo.mpiwg-berlin.mpg.de','',path) # falls echo +# path=re.sub('//','/',path) # falls echo fh=open(path,'w') - + zLOG.LOG("OSAS",zLOG.INFO,path) fh.write(xmlneu) fh.close() return "ok"