Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 431:630a4581992a
*** empty log message ***
| author | abukhman |
|---|---|
| date | Tue, 15 Feb 2011 12:12:39 +0100 |
| parents | 672f8857ece8 |
| children | 8d8f2cbd6213 |
comparison
equal
deleted
inserted
replaced
| 430:d6a2125a4b09 | 431:630a4581992a |
|---|---|
| 207 pagedivs = dom.xpath("//div[@class='pageNumberOrig']") | 207 pagedivs = dom.xpath("//div[@class='pageNumberOrig']") |
| 208 if pagedivs == dom.xpath("//div[@class='pageNumberOrig']"): | 208 if pagedivs == dom.xpath("//div[@class='pageNumberOrig']"): |
| 209 if len(pagedivs)>0: | 209 if len(pagedivs)>0: |
| 210 docinfo['pageNumberOrig']= getTextFromNode(pagedivs[0]) | 210 docinfo['pageNumberOrig']= getTextFromNode(pagedivs[0]) |
| 211 logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrig'])) | 211 logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrig'])) |
| 212 | 212 |
| 213 #original Pages Norm | |
| 214 pagedivs = dom.xpath("//div[@class='pageNumberOrigNorm']") | |
| 215 if pagedivs == dom.xpath("//div[@class='pageNumberOrigNorm']"): | |
| 216 if len(pagedivs)>0: | |
| 217 docinfo['pageNumberOrigNorm']= getTextFromNode(pagedivs[0]) | |
| 218 logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrigNorm'])) | |
| 219 | |
| 220 | |
| 213 #figureEntries | 221 #figureEntries |
| 214 pagedivs = dom.xpath("//div[@class='countFigureEntries']") | 222 pagedivs = dom.xpath("//div[@class='countFigureEntries']") |
| 215 if pagedivs == dom.xpath("//div[@class='countFigureEntries']"): | 223 if pagedivs == dom.xpath("//div[@class='countFigureEntries']"): |
| 216 if len(pagedivs)>0: | 224 if len(pagedivs)>0: |
| 217 docinfo['countFigureEntries'] = getTextFromNode(pagedivs[0]) | 225 docinfo['countFigureEntries'] = getTextFromNode(pagedivs[0]) |
| 286 docinfo['pageNumberOrig'] = 0 | 294 docinfo['pageNumberOrig'] = 0 |
| 287 docinfo['countFigureEntries'] = 0 | 295 docinfo['countFigureEntries'] = 0 |
| 288 docinfo['countPlaces'] = 0 | 296 docinfo['countPlaces'] = 0 |
| 289 docinfo['countTocEntries'] = 0 | 297 docinfo['countTocEntries'] = 0 |
| 290 docinfo['numPages'] = 0 | 298 docinfo['numPages'] = 0 |
| 299 docinfo['pageNumberOrigNorm'] = 0 | |
| 291 #return docinfo | 300 #return docinfo |
| 292 | 301 |
| 293 # plain text mode | 302 # plain text mode |
| 294 if mode == "text": | 303 if mode == "text": |
| 295 # first div contains text | 304 # first div contains text |
