py:choose not working

Bug #588939 reported by ChrisW
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Chamelon Core
Incomplete
Undecided
Unassigned

Bug Description

With the reference implementation of genshi you can do the following:
>>> from genshi.template import MarkupTemplate
>>> tmp = MarkupTemplate("""\
... <div xmlns="http://www.w3.org/1999/xhtml"
... xmlns:py="http://genshi.edgewall.org/">
... <py:choose test="">
... <span py:when="0 == 1">0</span>
... <span py:when="1 == 1">1</span>
... </py:choose>
... </div>""")
>>> stream = tmp.generate()
>>> print stream.render('xhtml')
<div xmlns="http://www.w3.org/1999/xhtml">
    <span>1</span>
</div>

The same doesn't work in chameleon.genshi.

Tags: genshi
Revision history for this message
ChrisW (chris-simplistix) wrote :
Revision history for this message
Malthe Borch (mborch) wrote :

What does Chameleon do?

Changed in chameleon.core:
status: New → Incomplete
Revision history for this message
ChrisW (chris-simplistix) wrote :

I can't remember, but if you apply the patch and run the tests you'd find out...

Chris

Revision history for this message
dfalk (dfalk) wrote :

For me, it outputs the entire py:choose block as if it were just another element.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.