ZPT is an invention of Zope Corporation, and is based on XHTML, which is HTML that conforms to stricter XML standards. XHTML requires code to be well formed (for example,<img />, <span></span>
, and so on), and it requires that code to be properly nested and always in lowercase form. XHTML also allows you to create different sets of markup tags for new purposes. For example, you can create blocks of code, using a syntax such as <tal:block></tal:block>
or <metal:block></metal:block>
, to create better structured page templates. CMFPlone's
main_template.pt
is a good example of this code in action, though it can also be found in any .zpt
or .pt
file.
The goal of TAL is to be a templating language that allows for "round-trip" collaboration by themers and programmers. A designer may create a template, as he/she creates a normal XHTML document, using placeholder text. The designer may then pass it to a programmer or themer who knows TAL attributes...