changeset 245:437d697a40e5

*** empty log message ***
author abukhman
date Mon, 11 Oct 2010 17:45:51 +0200
parents 7f089a0cb189
children 6a43ff50eb9a
files MpdlXmlTextServer.py
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Mon Oct 11 17:06:33 2010 +0200
+++ b/MpdlXmlTextServer.py	Mon Oct 11 17:45:51 2010 +0200
@@ -145,17 +145,15 @@
         xpath='//place'
         text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'], xpath,pn))
         pagedom = Parse(text)
-        result =pagedom.xpath("//result/resultPage/")
+        result =pagedom.xpath("//result/resultPage/place")
         for l in result:
-            hrefNode= l.getAttributeNodeNS(None, u"place")
+            hrefNode= l.getAttributeNodeNS(None, u"id")
+            logging.debug("documentViewer (characterNormalization) l: %s"%(l))
             if hrefNode:
                 href= hrefNode.nodeValue
                 if href.startswith('id='):
-                    hrefNode.nodeValue = href.replace('id=',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%sid="%(url,viewMode,tocMode,tocPN,pn))
-                    logging.debug("YYYY href%s"%href)
-                    logging.debug("YYYY serializeNode(pagenode)%s"%serializeNode(pagenode))
-                    logging.debug("YYYY hrefNode.nodeValue%s"%hrefNode.nodeValue)
-        logging.debug("YYYY serializeNode(pagenode)%s"%serializeNode(pagenode))            
+                    hrefNode.nodeValue = href.replace('id=',"?")
+                                
         return serializeNode(pagenode)
     
     def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""):