Diff for /MPIWGWeb/xmlhelper.py between versions 1.3 and 1.5

version 1.3, 2004/08/11 13:02:04 version 1.5, 2004/09/02 15:33:42
Line 15  from Ft.Xml.XLink import XLinkElements Line 15  from Ft.Xml.XLink import XLinkElements
 #from Ft.Xml import EMPTY_NAMESPACE  #from Ft.Xml import EMPTY_NAMESPACE
 from Ft.Lib import Uri  from Ft.Lib import Uri
   
 xml2html={'WEB_normal':('<p>','</p>'),'Normal':('<p>','</p>'),'WEB_picture':('<p>','</p>'),'WEB_figuretitle':('<i>','</i>'),'WEB_bibliography':('<p><i>','</i></p>'),'Web_kursiv':('<i>','</i>'),'WEB_kursiv':('<i>','</i>'),'WEB_hyperlink':('',''),'Hyperlink':('','')}  xml2html={'WEB_normal':('<p>','</p>'),'Normal':('<p>','</p>'),'WEB_picture':('<p class="picture">','</p>'),'WEB_figuretitle':('<p class="picturetitle">','</p>'),'WEB_bibliography':('<p><i>','</i></p>'),'Web_kursiv':('<i>','</i>'),'WEB_kursiv':('<i>','</i>'),'WEB_hyperlink':('',''),'Hyperlink':('','')}
   
 def addToDict(dict,name,value):  def addToDict(dict,name,value):
     if name=="":      if name=="":
Line 53  def proj2hash(xmlstring): Line 53  def proj2hash(xmlstring):
                   
         sec=parseSection(section)          sec=parseSection(section)
         if sec[0]=="WEB_project_header": # Sonderfall project          if sec[0]=="WEB_project_header": # Sonderfall project
   
             addToDict(list,'WEB_project_header',sec[1]) # store title              addToDict(list,'WEB_project_header',sec[1]) # store title
             addToDict(list,'WEB_project_description',sec[2]) #store description              addToDict(list,'WEB_project_description',sec[2]) #store description
         else: # no information in heading          else: # no information in heading
   
             addToDict(list,sec[0],sec[2])              addToDict(list,sec[0],sec[2])
   
     #evaluate higher level sections      #evaluate higher level sections
Line 78  def proj2hash(xmlstring): Line 80  def proj2hash(xmlstring):
 def parseSection(section):  def parseSection(section):
     type=""      type=""
     header=""      header=""
     for heading in section.getElementsByTagName('heading'):      for heading in section.childNodes:
           if getattr(heading,'tagName','')=="heading":
               
         type=heading.getAttribute('class')          type=heading.getAttribute('class')
         header=getText(heading.childNodes)          header=getText(heading.childNodes)
   

Removed from v.1.3  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>