version 1.241, 2011/07/29 10:33:17
|
version 1.242, 2011/08/31 13:55:07
|
Line 198 class MpdlXmlTextServer(SimpleItem):
|
Line 198 class MpdlXmlTextServer(SimpleItem):
|
highlightQuery = pageinfo['highlightQuery'] |
highlightQuery = pageinfo['highlightQuery'] |
#mode = pageinfo ['viewMode'] |
#mode = pageinfo ['viewMode'] |
tocMode = pageinfo['tocMode'] |
tocMode = pageinfo['tocMode'] |
|
xpointer = pageinfo['xpointer'] |
characterNormalization=pageinfo['characterNormalization'] |
characterNormalization=pageinfo['characterNormalization'] |
tocPN = pageinfo['tocPN'] |
tocPN = pageinfo['tocPN'] |
selfurl = self.absolute_url() |
selfurl = self.absolute_url() |
Line 206 class MpdlXmlTextServer(SimpleItem):
|
Line 207 class MpdlXmlTextServer(SimpleItem):
|
else: |
else: |
textmode = mode |
textmode = mode |
|
|
textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s"%(docpath,textmode,pn,characterNormalization) |
textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s&options=withXmlNodeId&xpointer=%s"%(docpath,textmode,pn,characterNormalization, xpointer) |
if highlightQuery is not None: |
if highlightQuery is not None: |
#textParam +="&highlightQuery=%s&sn=%s"%(urllib.quote(highlightQuery),sn) |
#textParam +="&highlightQuery=%s&sn=%s"%(urllib.quote(highlightQuery),sn) |
textParam +="&highlightQuery=%s&s=%s&highlightElement=%s&highlightElementPos=%s"%(urllib.quote(highlightQuery),s, highlightElement, highlightElementPos) |
textParam +="&highlightQuery=%s&s=%s&highlightElement=%s&highlightElementPos=%s"%(urllib.quote(highlightQuery),s, highlightElement, highlightElementPos) |
Line 319 class MpdlXmlTextServer(SimpleItem):
|
Line 320 class MpdlXmlTextServer(SimpleItem):
|
href= hrefNode.nodeValue |
href= hrefNode.nodeValue |
if href.startswith('#note-'): |
if href.startswith('#note-'): |
hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=text&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,tocMode,tocPN,pn)) |
hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=text&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,tocMode,tocPN,pn)) |
|
#if href.startswith(): |
return serializeNode(pagenode) |
return serializeNode(pagenode) |
if mode == "xml": |
if mode == "xml": |
# first div contains text |
# first div contains text |