encyclopegia.org

Template Attribute Language

The Template Attribute Language (TAL) is a templating language used to generate dynamic HTML and XML documents. It is designed to facilitate a clear separation between presentation and application logic, thereby supporting collaboration between designers and programmers. This is achieved by expressing template logic through attributes defined in an XML namespace, which are added to otherwise valid HTML or XML elements. By using structured attributes rather than arbitrary embedded code, templates remain well-formed documents that can be viewed and edited with standard XML or HTML authoring systems. TAL was created for Zope but is used in other Python-based projects as well.

The Template Attribute Language (TAL) is a templating language used to generate dynamic HTML and XML documents. It is designed to facilitate a clear separation between presentation and application logic, thereby supporting collaboration between designers and programmers. This is achieved by expressing template logic through attributes defined in an XML namespace, which are added to otherwise valid HTML or XML elements. By using structured attributes rather than arbitrary embedded code, templates remain well-formed documents that can be viewed and edited with standard XML or HTML authoring systems. TAL was created for Zope but is used in other Python-based projects as well. replaces the given attributes (e. g. by using tal:attributes="name name; id name" the name and id attributes of an input field could be set to the value of the variable " name ") omit-tag allows to omit the start and end tag and only render the content if the given expression is true. on-error if an error occurs, this attribute works like the content tag. If a tag has more than one TAL attributes, they are evaluated in the above (fairly logical) order. In cases when no tag is present which lends itself to take the attributes, special TAL tags can be used, making the " tal: " prefix optional. e.g.: ... would cause the code inside the tal:if tags to be used whenever the context (whatever the application server defines the context to be, e.g. an object) contains variable " itemlist " with a true value, e.g. a list containing at least one element. The identifier following the colon is arbitrary; it simply needs to be there, and to be the same for the opening and closing tag. ( xmlns:metal="http://xml.zope.org/namespaces/metal" ). ... ... ...

References

No reference rows published for this article.

Cite this article

MLA

"Template Attribute Language." encyclopegia.org, 2026, https://encyclopegia.org/wiki/template-attribute-language. Accessed 25 November 2026.

Chicago

"Template Attribute Language." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/template-attribute-language.

APA

encyclopegia.org. (2026). Template Attribute Language. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/template-attribute-language

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Template:New Wave (Contest)

stub · references available

Template:Support

stub · references available

Template:Lang-tr

stub · references available

Template:Footy-stub

stub · references available

Template:Location map Iceland

stub · references available

Template:Location map Sweden, 40south

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1344907721 · 0.5 · snapshot enwiki-001344907721

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.