Diff for /documentViewer/documentViewer.py between versions 1.28 and 1.29

version 1.28, 2007/06/14 16:07:21 version 1.29, 2007/06/15 14:16:27
Line 32  def getInt(number, default=0): Line 32  def getInt(number, default=0):
     try:      try:
         return int(number)          return int(number)
     except:      except:
         return default          return int(default)
   
 def getTextFromNode(nodename):  def getTextFromNode(nodename):
     """get the cdata content of a node"""      """get the cdata content of a node"""
Line 439  class documentViewer(Folder): Line 439  class documentViewer(Folder):
         """gets the bibliographical information from the preseantion entry in texttools          """gets the bibliographical information from the preseantion entry in texttools
         """          """
         dom=self.getPresentationInfoXML(url)          dom=self.getPresentationInfoXML(url)
           try:
         docinfo['author']=getTextFromNode(dom.xpath("//author")[0])          docinfo['author']=getTextFromNode(dom.xpath("//author")[0])
           except:
               pass
           try:
         docinfo['title']=getTextFromNode(dom.xpath("//title")[0])          docinfo['title']=getTextFromNode(dom.xpath("//title")[0])
         #docinfo['year']=getTextFromNode(dom.xpath("//date")[0])          except:
               pass
           try:
               docinfo['year']=getTextFromNode(dom.xpath("//date")[0])
           except:
               pass
         return docinfo          return docinfo
           
     def getDocinfoFromImagePath(self,path,docinfo=None):      def getDocinfoFromImagePath(self,path,docinfo=None):

Removed from v.1.28  
changed lines
  Added in v.1.29


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