equal
deleted
inserted
replaced
306 # xmldecl and html opening tag |
306 # xmldecl and html opening tag |
307 self.xmldecl = u'<?xml version="1.0" encoding="%s"?>\n' % req.encoding |
307 self.xmldecl = u'<?xml version="1.0" encoding="%s"?>\n' % req.encoding |
308 self.htmltag = u'<html xmlns="http://www.w3.org/1999/xhtml" ' \ |
308 self.htmltag = u'<html xmlns="http://www.w3.org/1999/xhtml" ' \ |
309 'xmlns:cubicweb="http://www.logilab.org/2008/cubicweb" ' \ |
309 'xmlns:cubicweb="http://www.logilab.org/2008/cubicweb" ' \ |
310 'xml:lang="%s" lang="%s">' % (req.lang, req.lang) |
310 'xml:lang="%s" lang="%s">' % (req.lang, req.lang) |
311 |
311 # keep main_stream's reference on req for easier text/html demoting |
|
312 req.main_stream = self |
312 |
313 |
313 def write(self, data): |
314 def write(self, data): |
314 """StringIO interface: this method will be assigned to self.w |
315 """StringIO interface: this method will be assigned to self.w |
315 """ |
316 """ |
316 self.body.write(data) |
317 self.body.write(data) |