[ZPT] execution order of tal:omit-tags & tal:attributes

Jamie Heilman jamie-zopetal@audible.transient.net
Mon, 9 Sep 2002 14:38:52 -0700


My appologies if this has been answered before, I searched the list
archive but I couldn't find it.  I'm currious as to the reasoning
behind tal:attributes being executed before tal:omit-tags.  I'm unable
to imagine a scenario where its useful to render attributes then
throw them away.  But I do see some possible advantages to the reverse
order, the possibility of less code[1] and the possiblity of faster
execution due to the short circuit effect.  Is this just an artifact
of the implementation or is there utility in this ordering that is
just escaping me?

[1] <b tal:attributes="class here/foo | nothing"
       tal:omit-tag="not:exists:here/foo | not:here/foo">bar</b>
    ...could instead be written as...
    <b tal:attributes="class here/foo"
       tal:omit-tag="not:exists:here/foo | not:here/foo">bar</b>

-- 
Jamie Heilman                   http://audible.transient.net/~jamie/
"Most people wouldn't know music if it came up and bit them on the ass."
                                                        -Frank Zappa