[Repoze-dev] [chameleon bug] ?python not working

2010-06-02 Thread Chris Withers

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=titleThis is replaced./title
...   /head
... /html
... )
 stream = tmp.generate()
 print stream.render('xhtml')
html
  head
titleA 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=titleThis is replaced./title
+  ...   /head
+  ... /html)
+  html
+head
+  titleA Genshi Template/title
+/head
+  /html
+
 py:if
 
print render(\
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [chameleon bug] ?python not working

2010-06-02 Thread Wichert Akkerman
On 2010-6-2 20:38, Chris Withers wrote:
 What tracker should I put this in?

Please see http://chameleon.repoze.org/docs/latest/ which documents this.

Wichert.
-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [chameleon bug] ?python not working

2010-06-02 Thread Chris Withers
Wichert Akkerman wrote:
 On 2010-6-2 20:38, Chris Withers wrote:
 What tracker should I put this in?
 
 Please see http://chameleon.repoze.org/docs/latest/ which documents this.

Documents what? I see no reference to ?python or its lack.

On the off chance you meant a bug tracker, I'll post both of these bugs 
there.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev