[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Appendix C:
Zope Page Templates Reference
webmaster at zope.org
webmaster at zope.org
Mon Nov 3 10:57:07 EST 2003
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx#3-0
The TAL namespace URI and recommended alias are currently defined
% snell - Nov. 2, 2003 8:34 am:
The first two paragraphs of The Zope Book seem to have been forgotten in the recent past. They read:
Welcome to The Zope Book. This book is designed to introduce you to Zope, the open source web application
To make effective use of the book, you should know how to use a web browser and you should have a basic
understanding of HTML (Hyper Text Markup Language) and URLs (Uniform Resource Locators). You don't need to be
a highly-skilled programmer in order to use Zope, but some programming background (particularly
object-oriented programming) will be extremely helpful. "
This statement calls for a return to that philosophy. TAL syntax basics are not explained in this document;
therefore, the new student - who has been directed to that fact that TAL avoids many problems of dtml and,
therefore, wants to learn it - finds it inaccessible.
Two months into Zope I discovered an archive document which explained TAL syntax structure and would offer
that here as a pointer. However, I cannot find it a second time!
% Anonymous User - Nov. 3, 2003 10:57 am:
Here is what is missing:
An attribute language is a programming language designed to mesh in a particular way with documents written
using tag-structured markup, such as HTML and XML. The statements of the language are document tags with
special attributes, and look like this:
<p ns:command="argument">Some Text</p>
The attribute ns:command="argument" is the statement attribute, and the entire paragraph tag is the statement
element, the portion of the document on which this statement operates. Each statement attribute has three
parts: the namespace prefix, the name, and the argument. The prefix identifies the language, and must be
introduced by an XML namespace declaration in XML and XHTML documents, like this:
HTML should include these declarations, but an implementation may allow you to omit them. The statement name
determines which language statement to apply to the statement element, and the argument determines how it is
applied. The name is always a simple identifier, but the argument can contain just about anything, depending
on the statement.
How to Specify an Attribute Language
If you create an attribute language, you need to define the following:
The URI of the XML namespace, and (optionally) a recommended alias.
The names, argument syntax, and meaning of the possible statements.
The order in which statements on the same element are processed, and restrictions on which statements can
share the same element.
More information about the ZDP