Mercurial > genshi > mirror
annotate examples/bench/kid/template.kid @ 674:2f229c542d90 experimental-optimizer
Creating branch for experimenting with template rendering optimisations.
author | athomas |
---|---|
date | Wed, 23 Jan 2008 12:20:21 +0000 |
parents | d60486018004 |
children |
rev | line source |
---|---|
57
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
1 <!DOCTYPE html |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
4 <html xmlns="http://www.w3.org/1999/xhtml" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
5 xmlns:py="http://purl.org/kid/ns#" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
6 py:extends="'base.kid'" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
7 lang="en"> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
8 <head> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
9 <title>${title}</title> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
10 </head> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
11 <body> |
76 | 12 <div>${greeting(user)}</div> |
69 | 13 <div>${greeting('me')}</div> |
76 | 14 <div>${greeting('world')}</div> |
57
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
15 |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
16 <h2>Loop</h2> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
17 <ul py:if="items"> |
69 | 18 <li py:for="idx, item in enumerate(items)" py:content="item" |
81
d60486018004
Template expressions are now compiled to Python bytecode.
cmlenz
parents:
76
diff
changeset
|
19 class="${idx + 1 == len(items) and 'last' or None}" /> |
57
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
20 </ul> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
21 </body> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
22 </html> |