--- documentViewer/MpdlXmlTextServer.py 2010/12/23 16:12:23 1.218 +++ documentViewer/MpdlXmlTextServer.py 2010/12/23 16:45:55 1.219 @@ -224,13 +224,25 @@ class MpdlXmlTextServer(SimpleItem): dom = Parse(text) # figureEntries pagedivs = dom.xpath("//div[@class='countFigureEntries']") - docinfo['figureEntries'] = getTextFromNode(pagedivs[0]) + s = getTextFromNode(pagedivs[0]) + try: + docinfo['figureEntries'] = int(s) + except: + docinfo['figureEntries'] = 0 # tocEntries pagedivs = dom.xpath("//div[@class='countTocEntries']") - docinfo['tocEntries'] = getTextFromNode(pagedivs[0]) + s = getTextFromNode(pagedivs[0]) + try: + docinfo['tocEntries'] = int(s) + except: + docinfo['tocEntries'] = 0 # allPlaces pagedivs = dom.xpath("//div[@class='countPlaces']") - docinfo['allPlaces']= getTextFromNode(pagedivs[0]) + s = getTextFromNode(pagedivs[0]) + try: + docinfo['allPlaces'] = int(s) + except: + docinfo['allPlaces'] = 0 return docinfo