Changeset 473:74e9e74277e9 in documentViewer
- Timestamp:
- Aug 5, 2011, 9:24:42 AM (13 years ago)
- Branch:
- elementtree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r471 r473 229 229 # assume first second level div is pageMeta 230 230 alldivs = dom.find("div") 231 232 if alldivs is None or alldivs.get('class', '') != 'pageMeta': 233 logging.error("processPageInfo: pageMeta div not found!") 234 return 235 231 236 for div in alldivs: 232 237 dc = div.get('class') … … 265 270 if np % pageinfo['groupsize'] > 0: 266 271 pageinfo['numgroups'] += 1 267 272 273 #logging.debug("processPageInfo: pageinfo=%s"%repr(pageinfo)) 268 274 return 269 275 … … 292 298 selfurl = docinfo['viewerUrl'] 293 299 294 if mode == "dict" :295 # text_dict is called textPollux in the backend300 if mode == "dict" or mode == "text_dict": 301 # dict is called textPollux in the backend 296 302 textmode = "textPollux" 297 303 elif not mode: … … 324 330 # plain text mode 325 331 if mode == "text": 326 if pagediv :332 if pagediv is not None: 327 333 links = pagediv.findall(".//a") 328 334 for l in links: … … 336 342 # text-with-links mode 337 343 elif mode == "text_dict": 338 if pagediv :344 if pagediv is not None: 339 345 # check all a-tags 340 346 links = pagediv.findall(".//a") … … 366 372 # xml mode 367 373 elif mode == "xml": 368 if pagediv :374 if pagediv is not None: 369 375 return serialize(pagediv) 370 376 371 377 # pureXml mode 372 378 elif mode == "pureXml": 373 if pagediv :379 if pagediv is not None: 374 380 return serialize(pagediv) 375 381 … … 377 383 elif mode == "gis": 378 384 name = docinfo['name'] 379 if pagediv :385 if pagediv is not None: 380 386 # check all a-tags 381 387 links = pagediv.findall(".//a") -
documentViewer.py
r472 r473 462 462 docinfo['documentUrl'] = docUrl 463 463 # process index.meta contents 464 if metaDom is not None :464 if metaDom is not None and metaDom.tag == 'resource': 465 465 # document directory name and path 466 466 resource = self.metadataService.getResourceData(dom=metaDom)
Note: See TracChangeset
for help on using the changeset viewer.