version 1.78, 2010/10/11 14:49:37
|
version 1.80, 2010/10/11 15:06:33
|
Line 143 class MpdlXmlTextServer(SimpleItem):
|
Line 143 class MpdlXmlTextServer(SimpleItem):
|
def getGisPlases(self, docinfo): |
def getGisPlases(self, docinfo): |
""" Show all Gis Places of whole Page""" |
""" Show all Gis Places of whole Page""" |
xpath='//place' |
xpath='//place' |
text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'], xpath)) |
text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'], xpath,pn)) |
pagedom = Parse(text) |
pagedom = Parse(text) |
result =pagedom.xpath("//result/resultPage/") |
result =pagedom.xpath("//result/resultPage/") |
logging.debug("YYYY result%s"%result) |
|
for l in result: |
for l in result: |
hrefNode= l.getAttributeNodeNS(None, u"place") |
hrefNode= l.getAttributeNodeNS(None, u"place") |
logging.debug("YYYY hrefNode%s"%hrefNode) |
|
if hrefNode: |
if hrefNode: |
href= hrefNode.nodeValue |
href= hrefNode.nodeValue |
if href.startswith('id='): |
if href.startswith('id='): |
hrefNode.nodeValue = href.replace('id=',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%sid="%(url,viewMode,tocMode,tocPN,pn)) |
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 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)) |
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=""): |