Mercurial > hg > documentViewer
diff MpiwgXmlTextServer.py @ 579:fc861a6cef17
update in w-tag format.
author | casties |
---|---|
date | Fri, 26 Oct 2012 12:53:43 +0200 |
parents | 9251719154a3 |
children | ca0274423382 |
line wrap: on
line diff
--- a/MpiwgXmlTextServer.py Fri Oct 19 18:51:47 2012 +0200 +++ b/MpiwgXmlTextServer.py Fri Oct 26 12:53:43 2012 +0200 @@ -212,7 +212,7 @@ normMode = 'norm' # TODO: this should not be necessary when the backend is fixed - textParams['normalization'] = normMode + #textParams['normalization'] = normMode if not mode: # default is dict @@ -273,7 +273,7 @@ logging.debug("pagediv: %s"%repr(pagediv)) if pagediv is not None: # add textmode and normMode classes - pagediv.set('class', 'text %s %s'%(textmode, normMode)) + #pagediv.set('class', 'text %s %s'%(textmode, normMode)) self._processWTags(textmode, normMode, pagediv) #self._processPbTag(pagediv, pageinfo) self._processFigures(pagediv, docinfo) @@ -342,7 +342,7 @@ return serialize(pagediv) - logging.error("getTextPage: error in text mode %s or text!"%(textmode)) + logging.error("getTextPage: error in text mode %s or in text!"%(textmode)) return None def _processWTags(self, textMode, normMode, pagediv): @@ -357,7 +357,7 @@ wtag.remove(wtag.find("span[@class='nodictionary reg']")) wtag.remove(wtag.find("span[@class='nodictionary norm']")) # delete non-matching children of a-tag and suppress remaining tag name - atag = wtag.find("a[@class='dictionary']") + atag = wtag.find("*[@class='dictionary']") if normMode == 'orig': atag.remove(atag.find("span[@class='reg']")) atag.remove(atag.find("span[@class='norm']")) @@ -373,7 +373,7 @@ else: # delete a-tag - wtag.remove(wtag.find("a[@class='dictionary']")) + wtag.remove(wtag.find("*[@class='dictionary']")) # delete non-matching children and suppress remaining tag name if normMode == 'orig': wtag.remove(wtag.find("span[@class='nodictionary reg']"))