changeset 579:fc861a6cef17

update in w-tag format.
author casties
date Fri, 26 Oct 2012 12:53:43 +0200
parents 024b75162437
children 0806cb9061c1
files MpiwgXmlTextServer.py zpt/viewer_index.zpt
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
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']"))
--- a/zpt/viewer_index.zpt	Fri Oct 19 18:51:47 2012 +0200
+++ b/zpt/viewer_index.zpt	Fri Oct 26 12:53:43 2012 +0200
@@ -102,7 +102,7 @@
           </table>
         </tal:block>
 
-        <tal:block tal:define="ctxs docinfo/presentationContext | nothing">
+        <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs">
           <h2>Presentation context</h2>
           <ul>
             <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name"