Paul Winkler wrote:
On Fri, May 13, 2005 at 05:39:56PM +0400, Dmitry Vasiliev wrote:
'<span tal:content="default">42</span>' => '<span>42</span>' '<span tal:replace="default">42</span>' => '42'
+1. IMHO the current behavior is wrong. "replace" should always replace the element, no exceptions. (Zope 2 has the same bug, I just checked.)
You can certainly disagree with this behavior, but it is not a bug.
See http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx for example, which states that default is "A special value that doesn't change anything when used in tal:replace, tal:content, or tal:attributes. It leaves the template text in place."
But see also the "Omitting Tags" section for opposite examples:
""" <b tal:omit-tag=""><i>this</i> stays</b>
At this level of usage, tal:omit-tag operates almost like tal:replace="default". """
Now in my Z3 sandbox 'tal:replace="value"' is just a syntactic sugar for 'tal:content="value" tal:omit-tag=""' (I guess this is only the way to work around the "automatic msgid's translation" issue) so I've found the bug.
-- Dmitry Vasiliev (dima at hlabs.spb.ru) http://hlabs.spb.ru _______________________________________________ Zope3-dev mailing list Zope3email@example.com Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com