def renderxml(obj): context = TALContext(allowPythonPath=1) context.addGlobal('here', obj) context.addGlobal('self', obj) context.addGlobal('container', obj.parentNode) context.addGlobal('config', obj.ownerDocument.config) context.addGlobal('context', obj.ownerDocument.context) context.addGlobal('template', template) context.addGlobal('templates', obj.renderer) output = StringIO() template.expand(context, output, encoding, docType=None, suppressXMLDeclaration=1) return unicode(output.getvalue(), encoding)
def renderhtml(obj): context = TALContext(allowPythonPath=1) context.addGlobal('here', obj) context.addGlobal('self', obj) context.addGlobal('container', obj.parentNode) context.addGlobal('config', obj.ownerDocument.config) context.addGlobal('context', obj.ownerDocument.context) context.addGlobal('template', template) context.addGlobal('templates', obj.renderer) output = StringIO() template.expand(context, output) return output.getvalue()
def renderxml(obj): context = TALContext(allowPythonPath=1) context.addGlobal('here', obj) context.addGlobal('self', obj) context.addGlobal('container', obj.parentNode) context.addGlobal('config', obj.ownerDocument.config) context.addGlobal('context', obj.ownerDocument.context) context.addGlobal('template', template) context.addGlobal('templates', obj.renderer) output = StringIO() template.expand(context, output, docType=None, suppressXMLDeclaration=1) return output.getvalue()
def renderhtml(obj): context = TALContext(allowPythonPath=1) context.addGlobal("here", obj) context.addGlobal("self", obj) context.addGlobal("container", obj.parentNode) context.addGlobal("config", obj.ownerDocument.config) context.addGlobal("context", obj.ownerDocument.context) context.addGlobal("template", template) context.addGlobal("templates", obj.renderer) output = StringIO() template.expand(context, output, encoding) return unicode(output.getvalue(), encoding)