version 1.123, 2010/10/14 11:50:39
|
version 1.143, 2010/10/15 09:58:12
|
Line 147 class MpdlXmlTextServer(SimpleItem):
|
Line 147 class MpdlXmlTextServer(SimpleItem):
|
url = docinfo['url'] |
url = docinfo['url'] |
selfurl = self.absolute_url() |
selfurl = self.absolute_url() |
pn = pageinfo['current'] |
pn = pageinfo['current'] |
|
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") |
for l in result: |
for l in result: |
hrefNode= l.getAttributeNodeNS(None, u"id") |
hrefNode= l.getAttributeNodeNS(None, u"id") |
href= hrefNode.nodeValue |
href= hrefNode.nodeValue |
|
hrefList.append(href) |
|
myList = ",".join(hrefList) |
|
return myList |
|
|
|
|
#href = ",".join(href) |
def getAllGisPlaces (self, docinfo=None, pageinfo=None): |
logging.debug("getGisPlaces :%s"%(href)) |
"""Show all Gis Places of whole Book """ |
return href |
xpath ='//echo:place' |
#return ";".join(["%s=%s" % (href, href) for href, href in params.items()]) |
docpath =docinfo['textURLPath'] |
#logging.debug("getGisPlaces :%s"%(href)) |
url = docinfo['url'] |
#if href.startswith('id='): |
selfurl =self.absolute_url() |
#hrefNode.nodeValue = href.replace('id=',"?") |
pn =pageinfo['current'] |
#logging.debug("documentViewer getGisPlaces (characterNormalization) hrefNode.nodeValue:%s"%(hrefNode.nodeValue)) |
hrefList=[] |
logging.debug("getGisPlaces :%s"%(href)) |
myList="" |
return "no text here" |
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) |
|
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""" |