version 1.169, 2011/02/24 13:55:28
|
version 1.170, 2011/03/01 14:53:15
|
Line 43 def getTextFromNode(nodename):
|
Line 43 def getTextFromNode(nodename):
|
rc = rc + node.data |
rc = rc + node.data |
return rc |
return rc |
|
|
def serializeNode(node, encoding='utf-8'): |
def serializeNode(node, encoding="utf-8"): |
"""returns a string containing node as XML""" |
"""returns a string containing node as XML""" |
buf = cStringIO.StringIO() |
stream = cStringIO.StringIO() |
Ft.Xml.Domlette.Print(node, stream=buf, encoding=encoding) |
logging.debug("BUF: %s"%(stream)) |
s = buf.getvalue() |
Ft.Xml.Domlette.PrettyPrint(node, stream=stream, encoding=encoding) |
buf.close() |
s = stream.getvalue() |
|
logging.debug("BUF: %s"%(s)) |
|
stream.close() |
return s |
return s |
|
|
def browserCheck(self): |
def browserCheck(self): |
Line 161 def getHttpData(url, data=None, num_trie
|
Line 163 def getHttpData(url, data=None, num_trie
|
raise IOError("ERROR fetching HTTP data from %s: %s"%(url,errmsg)) |
raise IOError("ERROR fetching HTTP data from %s: %s"%(url,errmsg)) |
#return None |
#return None |
|
|
|
|
|
|
## |
## |
## documentViewer class |
## documentViewer class |
## |
## |
Line 899 class documentViewer(Folder):
|
Line 899 class documentViewer(Folder):
|
pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30') |
pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30') |
pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10') |
pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10') |
pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1') |
pageinfo['tocPN'] = self.REQUEST.get('tocPN', '1') |
|
|
toc = int (pageinfo['tocPN']) |
toc = int (pageinfo['tocPN']) |
pageinfo['textPages'] =int (toc) |
pageinfo['textPages'] =int (toc) |
|
|
|
|
|
|
if 'tocSize_%s'%tocMode in docinfo: |
if 'tocSize_%s'%tocMode in docinfo: |
tocSize = int(docinfo['tocSize_%s'%tocMode]) |
tocSize = int(docinfo['tocSize_%s'%tocMode]) |
tocPageSize = int(pageinfo['tocPageSize']) |
tocPageSize = int(pageinfo['tocPageSize']) |