version 1.146, 2010/10/15 12:01:46
|
version 1.170, 2010/10/18 10:26:39
|
Line 178 class MpdlXmlTextServer(SimpleItem):
|
Line 178 class MpdlXmlTextServer(SimpleItem):
|
logging.debug("getALLGisPlaces :%s"%(myList)) |
logging.debug("getALLGisPlaces :%s"%(myList)) |
return myList |
return myList |
|
|
def getOrigPages (self, docinfo=None, pageinfo=None): |
def getOrigPages (self, docinfo=None): |
"""Show original page """ |
"""Show original page """ |
docpath = docinfo['textURLPath'] |
#docpath = docinfo['textURLPath'] |
url = docinfo['url'] |
#url = docinfo['url'] |
selfurl = self.absolute_url() |
selfurl = self.absolute_url() |
pn =pageinfo['current'] |
#pn =pageinfo['current'] |
|
|
viewMode= pageinfo['viewMode'] |
viewMode= pageinfo['viewMode'] |
text = self.getServerData("page-fragment.xql","document=%s&mode=%s&pn=%s"%(docpath, mode, pn)) |
#text = self.getServerData("page-fragment.xql","document=%s&mode=%s&pn=%s"%(docinfo['textURLPath'], 'text', pn)) |
|
text = self.getServerData("page-fragment.xql","document=%s&mode=%s"%(docinfo['textURLPath'], 'text')) |
dom =Parse(text) |
dom =Parse(text) |
pagedivs = dom.xpath("//div[@class='pageNumberOrig']") |
pagedivs = dom.xpath("//div[@class='pageNumberOrig']") |
logging.debug("getOrigPages :%s"%(pagedivs)) |
if len(pagedivs)>0: |
return pagedivs |
docinfo['originalPage'] = getTextFromNode(pagedivs[0]) |
|
#return docinfo['originalPage'] |
|
#return originalPage |
|
return docinfo |
|
|
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""" |