[ZPT] "structure" and TAL interpretation

Fergal Daly fergal at esatclear.ie
Fri Jul 23 11:19:20 EDT 2004


On Fri, Jul 23, 2004 at 10:49:13AM -0400, Fred Drake wrote:
> When using tal:content="structure some/path" or tal:replace="structure 
> some/path", the TAL interpreter takes the result of some/path and parses it, 
> evaluating any TAL attributes included in the structure, before inserting the 
> result in the output.
> 
> This is a huge performance hit.
> 
> Is anybody relying on the current behavior?  Is it being found useful?
> 
> We're considering adding a new insertion mode, possibly called "unquoted", 
> that skips the parsing and evaluation of the result of the expression.  This 
> would likely first appear in XopeX3 3.1.0, and won't be implemented until 
> after ZopeX3 3.0.0 is finished.

from Replace in

http://zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4

The value of the expression is converted into an escaped string if you
prefix the expression with text or omit the prefix, and is inserted
unchanged if you prefix it with structure.

So I think the docs don't correspond with the current behaviour at all.
Presumably anyone using this found it by accident or by reading the code,

F



More information about the ZPT mailing list