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

version 1.2, 2004/06/28 18:47:14 version 1.3, 2004/08/11 13:02:04
Line 76  def proj2hash(xmlstring): Line 76  def proj2hash(xmlstring):
   
   
 def parseSection(section):  def parseSection(section):
     heading=section.getElementsByTagName('heading')[0]      type=""
       header=""
       for heading in section.getElementsByTagName('heading'):
     type=heading.getAttribute('class')      type=heading.getAttribute('class')
     header=getText(heading.childNodes)      header=getText(heading.childNodes)
   
       if type=="": # falls heading fehlt, pruefe ob erster par richtig
           par=section.getElementsByTagName('par')[0]
           type=par.getAttribute('class')
           header=getText(par.childNodes)
           
     #print section.childNodes      #print section.childNodes
     pars=Evaluate('par',section)      pars=Evaluate('par',section)
     content=par2html(pars)      content=par2html(pars)
Line 165  def getText(nodelist): Line 173  def getText(nodelist):
           
     rc = u''      rc = u''
     for node in nodelist:      for node in nodelist:
         print "HHHH"  
         if node.nodeType == node.TEXT_NODE:          if node.nodeType == node.TEXT_NODE:
             #print "node",node              #print "node",node
             #print "NODE",node.data.encode('utf-8','ignore'),"V"              #print "NODE",node.data.encode('utf-8','ignore'),"V"
             #print "HALII"              #print "HALII"
             try:              try:
                 try:                  try:
                     print "try1"  
                     #rc += node.data.encode('utf-8','ignore')                      #rc += node.data.encode('utf-8','ignore')
                     rc += node.data                      rc += node.data
                                                                                   
                 except:                  except:
                     print "try2"  
                     #rc= node.data.encode('utf-8','ignore')                      #rc= node.data.encode('utf-8','ignore')
                     rc=node.data                      rc=node.data
             except:              except:
Line 189  def getText(nodelist): Line 194  def getText(nodelist):
         elif node.tagName =="inline":          elif node.tagName =="inline":
             rc+=par2html([node])              rc+=par2html([node])
         elif node.attributes:          elif node.attributes:
             print "xlink?"  
             if 'xlink:type' in node.attributes.keys(): #is a xlink?              if 'xlink:type' in node.attributes.keys(): #is a xlink?
                 rc +=xlink2html(node)                  rc +=xlink2html(node)
     #print "RWT",rc              #print "RWT",rc        

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


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