<s>
The	O
Template	B-Language
Attribute	I-Language
Language	I-Language
(	O
TAL	O
)	O
is	O
a	O
templating	O
language	O
used	O
to	O
generate	O
dynamic	O
HTML	B-Language
and	O
XML	B-Protocol
pages	O
.	O
</s>
<s>
This	O
is	O
achieved	O
by	O
embedding	O
TAL	O
statements	O
inside	O
valid	O
HTML	B-Language
(	O
or	O
XML	B-Protocol
)	O
tags	B-General_Concept
which	O
can	O
then	O
be	O
worked	O
on	O
using	O
common	O
design	O
tools	O
.	O
</s>
<s>
TAL	O
was	O
created	O
for	O
Zope	B-Language
but	O
is	O
used	O
in	O
other	O
Python-based	O
projects	O
as	O
well	O
.	O
</s>
<s>
creates	O
a	O
loop	O
variable	O
and	O
repeats	O
the	O
tag	B-General_Concept
iterating	O
a	O
sequence	O
,	O
e.g.	O
</s>
<s>
allows	O
to	O
omit	O
the	O
start	O
and	O
end	O
tag	B-General_Concept
and	O
only	O
render	O
the	O
content	O
if	O
the	O
given	O
expression	O
is	O
true	O
.	O
</s>
<s>
if	O
an	O
error	O
occurs	O
,	O
this	O
attribute	O
works	O
like	O
the	O
content	O
tag	B-General_Concept
.	O
</s>
<s>
If	O
a	O
tag	B-General_Concept
has	O
more	O
than	O
one	O
TAL	O
attributes	O
,	O
they	O
are	O
evaluated	O
in	O
the	O
above	O
(	O
fairly	O
logical	O
)	O
order	O
.	O
</s>
<s>
In	O
cases	O
when	O
no	O
tag	B-General_Concept
is	O
present	O
which	O
lends	O
itself	O
to	O
take	O
the	O
attributes	O
,	O
special	O
TAL	O
tags	B-General_Concept
can	O
be	O
used	O
,	O
making	O
the	O
"	O
tal	O
:	O
"	O
prefix	O
optional	O
.	O
</s>
<s>
would	O
cause	O
the	O
code	O
inside	O
the	O
tal:if	O
tags	B-General_Concept
to	O
be	O
used	O
whenever	O
the	O
context	O
(	O
whatever	O
the	O
application	O
server	O
defines	O
the	O
context	O
to	O
be	O
,	O
e.g.	O
</s>
<s>
a	O
list	O
containing	O
at	O
least	O
one	O
element	B-General_Concept
.	O
</s>
<s>
The	O
identifier	O
following	O
the	O
colon	O
is	O
arbitrary	O
;	O
it	O
simply	O
needs	O
to	O
be	O
there	O
,	O
and	O
to	O
be	O
the	O
same	O
for	O
the	O
opening	O
and	O
closing	O
tag	B-General_Concept
.	O
</s>
<s>
The	O
Macro	O
Expansion	O
Template	B-Language
Attribute	I-Language
Language	I-Language
(	O
METAL	O
)	O
complements	O
TAL	O
,	O
providing	O
macros	O
which	O
allow	O
the	O
reuse	O
of	O
code	O
across	O
template	O
files	O
.	O
</s>
<s>
Both	O
were	O
created	O
for	O
Zope	B-Language
but	O
are	O
used	O
in	O
other	O
Python	B-Language
projects	O
as	O
well	O
.	O
</s>
<s>
(	O
xmlns:metal	O
=	O
"	O
http://xml.zope.org/namespaces/metal	O
"	O
)	O
.	O
</s>
<s>
In	O
cases	O
when	O
no	O
tag	B-General_Concept
is	O
present	O
which	O
lends	O
itself	O
to	O
take	O
the	O
attributes	O
,	O
and	O
in	O
special	O
cases	O
when	O
more	O
than	O
one	O
METAL	O
attribute	O
is	O
needed	O
,	O
special	O
METAL	O
tags	B-General_Concept
can	O
be	O
used	O
,	O
making	O
the	O
„	O
metal	O
:	O
“	O
prefix	O
optional	O
.	O
</s>
<s>
E	O
.	O
g	O
.	O
(	O
sketched	O
with	O
Roundup	B-Application
in	O
mind	O
)	O
:	O
</s>
<s>
TAL/TALES/METAL	O
are	O
used	O
by	O
the	O
following	O
projects	O
:	O
</s>
<s>
Besides	O
the	O
original	O
Zope	B-Language
implementation	O
,	O
there	O
are	O
(	O
not	O
exhaustive	O
)	O
:	O
</s>
<s>
Flower	O
,	O
a	O
Raku	B-Application
implementation	O
of	O
TAL	O
,	O
with	O
some	O
Petal	O
and	O
PHPTAL	B-Language
extensions	O
.	O
</s>
