I have written a python's rpy script which generats a web page. All seems
works fine, but for now I was playing with html. Now, I decided to
upgrade
to xhtml (I need a different namespaces, you will see below). I've have
written an xhtml file:
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<head></head><body>
List
<ul>
<li>one</li>
<li>two</li>
</ul>
http://www.w3.org/2000/svg" width="10cm"
height="10cm">
svg:title A two shapes
</body></html>
And it is working. But when I'm trying to generate this file by rpy
script in this way:
class Resource(resource.Resource):
def render(self, request):
request.write('''
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg">
<head></head><body>
List
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
http://www.w3.org/2000/svg" width="10cm" height="10cm">
svg:title A two shapes
</body></html>
''')
request.finish()
return server.NOT_DONE_YET
resource = Resource()
browser dosent seem to understand that its xhtml code. I think I'm missing
something very easy, maybe I'm not properly understand philosophy of xhtml
or python.web. Do you know how to manage with this problem?
(Sorry for my english :) )
Cheers
Krzys