version 1.135, 2010/10/14 13:13:19
|
version 1.145, 2010/10/15 10:30:52
|
Line 148 class MpdlXmlTextServer(SimpleItem):
|
Line 148 class MpdlXmlTextServer(SimpleItem):
|
selfurl = self.absolute_url() |
selfurl = self.absolute_url() |
pn = pageinfo['current'] |
pn = pageinfo['current'] |
hrefList=[] |
hrefList=[] |
|
myList= "" |
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)) |
dom = Parse(text) |
dom = Parse(text) |
result = dom.xpath("//result/resultPage/place") |
result = dom.xpath("//result/resultPage/place") |
Line 156 class MpdlXmlTextServer(SimpleItem):
|
Line 156 class MpdlXmlTextServer(SimpleItem):
|
hrefNode= l.getAttributeNodeNS(None, u"id") |
hrefNode= l.getAttributeNodeNS(None, u"id") |
href= hrefNode.nodeValue |
href= hrefNode.nodeValue |
hrefList.append(href) |
hrefList.append(href) |
myList = "; ".join(hrefList) |
myList = ",".join(hrefList) |
#hoho =hrefList.replace('','') |
|
logging.debug("getGisPlaces :%s"%(myList)) |
logging.debug("getGisPlaces :%s"%(myList)) |
|
return myList |
|
|
|
def getAllGisPlaces (self, docinfo=None, pageinfo=None): |
|
"""Show all Gis Places of whole Book """ |
|
xpath ='//echo:place' |
|
docpath =docinfo['textURLPath'] |
|
url = docinfo['url'] |
|
selfurl =self.absolute_url() |
|
pn =pageinfo['current'] |
|
hrefList=[] |
|
myList="" |
|
text=self.getServerData("xpath.xql", "document=%s&xpath=%s"%(docinfo['textURLPath'],xpath)) |
|
dom =Parse(text) |
|
result = dom.xpath("//result/resultPage/place") |
|
for l in result: |
|
hrefNode = l.getAttributeNodeNS(None, u"id") |
|
href= hrefNode.nodeValue |
|
hrefList.append(href) |
|
myList = ",".join(hrefList) |
|
logging.debug("getALLGisPlaces :%s"%(myList)) |
return myList |
return myList |
|
|
|
|
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=""): |
"""returns single page from fulltext""" |
"""returns single page from fulltext""" |
docpath = docinfo['textURLPath'] |
docpath = docinfo['textURLPath'] |