[ZPT] Re: TAL's lack of an else...

Jean Jordaan jean at upfrontsystems.co.za
Fri Aug 1 16:15:42 EDT 2003


> Yep, but that's programming in XML for you.

How about we leave that to the unlucky souls who need to 
write XSLT. I really think that with some care and planning
  tal:condition="here/evalCondition"
  tal:condition="not:here/evalCondition"
is fine. If evalCondition is expensive, then it should look
after caching itself. If you need elsif and groups etc, can't
the complexity live one level down?

  <div tal:condition="here/ifCondition">     X </div>
  <div tal:condition="here/elseCondition">   Y </div>
  <div tal:condition="here/elseifCondition"> Z </div>

-- 
Jean Jordaan
http://www.upfrontsystems.co.za




More information about the ZPT mailing list