version 1.31, 2010/09/23 15:03:51
|
version 1.37, 2010/09/24 12:21:00
|
Line 48 class MpdlXmlTextServer(SimpleItem):
|
Line 48 class MpdlXmlTextServer(SimpleItem):
|
pn = pageinfo['searchPN'] |
pn = pageinfo['searchPN'] |
sn = pageinfo['sn'] |
sn = pageinfo['sn'] |
highlightQuery = pageinfo['highlightQuery'] |
highlightQuery = pageinfo['highlightQuery'] |
#query =pageinfo['query'] |
query =pageinfo['query'] |
queryType =pageinfo['queryType'] |
queryType =pageinfo['queryType'] |
viewMode= pageinfo['viewMode'] |
viewMode= pageinfo['viewMode'] |
tocMode = pageinfo['tocMode'] |
tocMode = pageinfo['tocMode'] |
Line 149 class MpdlXmlTextServer(SimpleItem):
|
Line 149 class MpdlXmlTextServer(SimpleItem):
|
if highlightQuery is not None: |
if highlightQuery is not None: |
textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn) |
textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn) |
|
|
pagexml = self.getServerData("page-fragment.xql",textParam) |
pagexml = self.getServerData("page-fragment.xql",urllib.quote(textParam)) |
#pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", textParam, outputUnicode=False) |
#pagexml=self.template.fulltextclient.eval("/mpdl/interface/page-fragment.xql", textParam, outputUnicode=False) |
|
|
pagedom = Parse(pagexml) |
pagedom = Parse(pagexml) |
Line 254 class MpdlXmlTextServer(SimpleItem):
|
Line 254 class MpdlXmlTextServer(SimpleItem):
|
tocSearch = 0 |
tocSearch = 0 |
tocDiv = None |
tocDiv = None |
|
|
pagexml = self.getServerData("doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath, 'text', queryType, query, pagesize, pn)) |
pagexml = self.getServerData("doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath, 'text', queryType, urllib.quote(query), pagesize, pn)) |
#pagexml=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath, 'text', queryType, query, pagesize, pn) ,outputUnicode=False) |
#pagexml=self.template.fulltextclient.eval("/mpdl/interface/doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s"%(docpath, 'text', queryType, query, pagesize, pn) ,outputUnicode=False) |
pagedom = Parse(pagexml) |
pagedom = Parse(pagexml) |
numdivs = pagedom.xpath("//div[@class='queryResultHits']") |
numdivs = pagedom.xpath("//div[@class='queryResultHits']") |