1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html>
<head>dadada</head>
<body xmlns:z="http://xml.zope.org/namespaces/tal" z:define="foo python:1">
<h1 z:condition="python:0">This title is not displayed</h1>
<h1 z:condition="python:1" z:content="str:This
Is
The
Replaced
Title">Title</h1>
<!-- test entity references -->
&HarryPotter;
<!-- examples adapted from TemplateAttributeLanguageSyntax -->
<span z:content="str:here/id"/>
<p z:define="x str:template/title; global five python:2+3;" z:content="text var:five"/>
<p z:repeat="car python:['honda', 'subaru', 'acura']">
<span z:replace="var:car"/>
</p>
<p xml:foo="bar">foo bar</p>
<!-- more examples -->
<ul>
<span z:repeat="car python:['honda', 'subaru', 'acura']">
<li z:content="var:car">Car Name</li>
</span>
</ul>
<!-- test attribute expansion -->
<a href="foo" z:attributes="href python:'http://python.org' ">python</a>
<a z:attributes="href python:'http://python.org' ">python</a>
<!-- test insert/replace structure -->
<span z:content="structure python:None" />
<span z:replace="structure python:None" />
<span z:define="global x str:<h3>Header Level 3</h3>" />
<span z:define="global x python:'&' + 'nbsp;;' + x" />
<span z:replace="structure x" />
<span z:content="structure x" />
</body>
</html>