# HG changeset patch # User Dirk Wintergruen # Date 1435825790 -7200 # Node ID 4a75a760def2668ba0886a9ee8ddf0fe8b732d9b # Parent 0c3aab82886445ef4506640f0fddc27cef2af659 dictionary handling added diff -r 0c3aab828864 -r 4a75a760def2 MpiwgXmlTextServer.py --- a/MpiwgXmlTextServer.py Thu Jul 02 10:27:05 2015 +0200 +++ b/MpiwgXmlTextServer.py Thu Jul 02 10:29:50 2015 +0200 @@ -303,8 +303,14 @@ textmode = 'plain' textParams['outputFormat'] = 'html' + + try: # fetch the page + + + + pagexml = self.getServerData("query/GetPage",urllib.urlencode(textParams)) dom = ET.fromstring(pagexml) except Exception, e: @@ -371,6 +377,18 @@ wtag.remove(wtag.find("span[@class='nodictionary norm']")) # delete non-matching children of a-tag and suppress remaining tag name atag = wtag.find("*[@class='dictionary']") + + if atag is None: #nicht gefunden weil noch andere Eintraege im class tag + for w in wtag.findall("a"): + val = w.attrib.get("class","") + if val.startswith("dictionary"): + atag=w + break + + + + + if normMode == 'orig': atag.remove(atag.find("span[@class='reg']")) atag.remove(atag.find("span[@class='norm']")) @@ -386,7 +404,21 @@ else: # delete a-tag - wtag.remove(wtag.find("*[@class='dictionary']")) + + + wt = wtag.find("*[@class='dictionary']") + + if wt is None: #nicht gefunden weil noch andere Eintraege im class tag vorhanden sind + for w in wtag.findall("a"): + val = w.attrib.get("class","") + if val.startswith("dictionary"): + wt=w + break + + + + + wtag.remove(wt) # delete non-matching children and suppress remaining tag name if normMode == 'orig': wtag.remove(wtag.find("span[@class='nodictionary reg']")) diff -r 0c3aab828864 -r 4a75a760def2 css/docuviewer.css --- a/css/docuviewer.css Thu Jul 02 10:27:05 2015 +0200 +++ b/css/docuviewer.css Thu Jul 02 10:29:50 2015 +0200 @@ -3,6 +3,14 @@ * * Robert Casties 2012. */ + + + .iliese { + background-color: lime; + } + + + body { background-color: #ebebeb; margin: 5px;