| 180 | This set of directives provides advanced contional processing: one of several alternatives is rendered depending on which of the `py:when` directives evaluates to a truth value. |
| 181 | |
| 182 | {{{ |
| 183 | #!xml |
| 184 | <div xmlns:py="http://markup.edgewall.org/" py:choose=""> |
| 185 | <span py:when="0 == 1">0</span> |
| 186 | <span py:when="1 == 1">1</span> |
| 187 | <span py:otherwise="">2</span> |
| 188 | </div> |
| 189 | }}} |
| 190 | |
| 191 | This would produce the following output: |
| 192 | |
| 193 | {{{ |
| 194 | #!xml |
| 195 | <div> |
| 196 | <span>1</span> |
| 197 | </div> |
| 198 | }}} |
| 199 | |