[ZPT] Authoring tools and tag-nesting problems

Hamish Lawson hamish_lawson@yahoo.co.uk
Thu, 5 Apr 2001 21:06:20 +0100 (BST)


I've encountered a problem with using authoring tools to style ZPT
documents.

I had a template with the following snippet:

   <b tal:content="container/name">Joe</b>

When I edited this template in Dreamweaver UltraDev and applied a
subtle shade of pink to "Joe", I found that the resulting HTML was:

   <b tal:content="container/name"><font color="#FF0080">Joe</font></b>

That is, Dreamweaver applied the <font> tag just to "Joe" and not
around the bold tags enclosing the text (other authoring tools may well
do the same, and I'm not sure we could say wrongly). This means that
when the template is rendered, the <font> tag ends up being lost when
it (and not just "Joe") gets replaced by the value of "container/name".

Other than subsequently tweaking the HTML code manually (but doesn't
that defeat one of the goals of ZPT?), how can we be sure that the TAL
statements will be on the appropriate (i.e. innermost) tag after
compound styling has been applied? Or is there a way to have a
"tal:content" statement affect only the innermost content? And if not,
ought there to be?

Hamish Lawson




____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie