version 1.84, 2010/10/11 15:52:42
|
version 1.87, 2010/10/13 14:55:03
|
Line 140 class MpdlXmlTextServer(SimpleItem):
|
Line 140 class MpdlXmlTextServer(SimpleItem):
|
docinfo['numPages']=int(getTextFromNode(result[0])) |
docinfo['numPages']=int(getTextFromNode(result[0])) |
return docinfo |
return docinfo |
|
|
def getGisPlases(self, docinfo): |
def getGisPlaces(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&pn=%s"%(docinfo['textURLPath'], xpath,pn)) |
text=self.getServerData("xpath.xql", "document=%s&xpath=%s&pn=%s"%(docinfo['textURLPath'], xpath,pn)) |
|
logging.debug("documentViewer getGisPlaces (text) text:%s"%(text)) |
pagedom = Parse(text) |
pagedom = Parse(text) |
result =pagedom.xpath("//result/resultPage/") |
result =pagedom.xpath("//result/resultPage/*") |
for l in result: |
for l in result: |
hrefNode= l.getAttributeNodeNS(None, u"id") |
hrefNode= l.getAttributeNodeNS(None, u"id") |
logging.debug("documentViewer (characterNormalization) l: %s"%(l)) |
logging.debug("documentViewer getGisPlaces (characterNormalization) l:%s"%(l)) |
if hrefNode: |
if hrefNode: |
href= hrefNode.nodeValue |
href= hrefNode.nodeValue |
if href.startswith('id='): |
if href.startswith('id='): |