[ZPT] tal:block and the Attribute Language doctrine

Evan Simpson evan@digicool.com
Tue, 12 Jun 2001 12:43:48 -0400


In response to the proposal for a "tal:block" element type, Hamish and 
Richard pointed out that the idea conflicts with the TAL ideal of 
eliminating DTML-style custom tags.

I hadn't really intended "tal:block" to be used in HTML; It was 
conceived as a solution to the problem of XML schemas with an equivalent 
to <span> and <div>.

In considering my response to these comments, though, I've gone back and 
reexamined my understanding of why we are promoting custom attributes 
over custom tags.  Don't worry; I haven't suddenly decided that the 
whole idea is bogus :-)

A bit of experimenting with the latest versions of DreamWeaver and 
GoLive shows that they don't really seem to care about the differences 
among <span tal:replace="foo">, <tal:block replace="foo">, and 
<tal-block replace="foo"> *as long as they are properly closed*.  The 
big culprit for DTML seems to be <dtml-var>, although <dtml-else> is 
equally confusing to unsuspecting tools.  Even if you taught your editor 
to deal with these, you can be foiled by the extensibility of DTML. 
Anybody can define new tags, with any structure.  Of course, in the 
world of XHTML/XML, matters are worse for DTML.

So, I continue to believe that attribute==statement is a fine concept. 
Where it is possible, simply adding TAL attributes to existing document 
tags is the way to go.  On the other hand, having *exactly one* custom 
tag in the TAL and METAL namespaces shouldn't be a problem, and is a 
natural candidate for when you *must* add a grouping tag, but don't want 
clutter in your rendered output.

Does anyone out there use a tool that chokes on <tal:block></tal:block>?

Cheers,

Evan @ digicool