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

Fergal Daly fergal at esatclear.ie
Fri Aug 1 15:24:19 EDT 2003


On Friday 01 August 2003 14:15, Jean Jordaan wrote:
> 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>

Expense is just one aspect, what if calling it twice is just something you 
shouldn't do because it inserts something in a datavase or has some other 
side effect. You should not have to wrap your objects in caching objects just 
to reliably use them in TAL,

F




More information about the ZPT mailing list