Hi All,
With the reference implementation of genshi you can do the following:
>>> from genshi.template import MarkupTemplate
>>> tmp = MarkupTemplate("""\
... <?python
... title = "A Genshi Template"
... ?>
... <html xmlns:py="http://genshi.edgewall.org/">
... <head>
... <title py:content="title">This is replaced.</title>
... </head>
... </html>
... """)
>>> stream = tmp.generate()
>>> print stream.render('xhtml')
<html>
<head>
<title>A Genshi Template</title>
</head>
</html>
The same doesn't work in chameleon.genshi.
The attached patch adds a failing test that demonstrates this.
What tracker should I put this in?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Index: src/chameleon/genshi/language.txt
===================================================================
--- src/chameleon/genshi/language.txt (revision 9494)
+++ src/chameleon/genshi/language.txt (working copy)
@@ -13,6 +13,23 @@
... result = func(**kwargs)
... return mt.process(result)
+<?python
+
+ >>> print render("""\
+ ... <?python
+ ... title = "A Genshi Template"
+ ... ?>
+ ... <html xmlns:py="http://genshi.edgewall.org/">
+ ... <head>
+ ... <title py:content="title">This is replaced.</title>
+ ... </head>
+ ... </html>""")
+ <html>
+ <head>
+ <title>A Genshi Template</title>
+ </head>
+ </html>
+
py:if
>>> print render("""\
_______________________________________________
Repoze-dev mailing list
[email protected]
http://lists.repoze.org/listinfo/repoze-dev