version 1.89, 2010/10/13 15:10:25
|
version 1.95, 2010/10/13 15:47:51
|
Line 146 class MpdlXmlTextServer(SimpleItem):
|
Line 146 class MpdlXmlTextServer(SimpleItem):
|
docpath = docinfo['textURLPath'] |
docpath = docinfo['textURLPath'] |
url = docinfo['url'] |
url = docinfo['url'] |
selfurl = self.absolute_url() |
selfurl = self.absolute_url() |
|
pn = pageinfo['current'] |
|
|
text=self.getServerData("xpath.xql", "document=%s&xpath='//place'%s&pn=%s"%(docinfo['textURLPath'],pn)) |
text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'],'//place',pn)) |
logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) |
#logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) |
pagedom = Parse(text) |
pagedom = Parse(text) |
result =pagedom.xpath("//result/resultPage/*") |
result =pagedom.xpath("//result/resultPage/place") |
|
logging.debug("getGisPlaces (place) text:%s"%(place)) |
for l in result: |
for l in result: |
hrefNode= l.getAttributeNodeNS(None, u"id") |
hrefNode= l.getAttributeNodeNS(None, u"id") |
logging.debug("documentViewer getGisPlaces (characterNormalization) l:%s"%(l)) |
logging.debug("documentViewer getGisPlaces (characterNormalization) l:%s"%(l)) |
Line 158 class MpdlXmlTextServer(SimpleItem):
|
Line 160 class MpdlXmlTextServer(SimpleItem):
|
href= hrefNode.nodeValue |
href= hrefNode.nodeValue |
if href.startswith('id='): |
if href.startswith('id='): |
hrefNode.nodeValue = href.replace('id=',"?") |
hrefNode.nodeValue = href.replace('id=',"?") |
|
|
return serializeNode(pagenode) |
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=""): |
def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): |