Mercurial > genshi > mirror
comparison examples/transform/template.xml @ 107:8b6bd2d920c1 trunk
Add example that shows how to transform an HTML document.
author | cmlenz |
---|---|
date | Fri, 28 Jul 2006 16:52:23 +0000 |
parents | |
children | 2368c3becc52 |
comparison
equal
deleted
inserted
replaced
106:f9473bdc93b2 | 107:8b6bd2d920c1 |
---|---|
1 <!DOCTYPE html | |
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
4 <html xmlns:py="http://markup.edgewall.org/" py:strip=""> | |
5 | |
6 <!--! Add a header DIV on top of every page with a logo image --> | |
7 <body py:match="body"> | |
8 <div id="header"> | |
9 <img src="logo.png" alt="Bad Style"/> | |
10 </div> | |
11 ${select('*')} | |
12 </body> | |
13 | |
14 <!--! Use semantic instead of presentational tags for emphasis --> | |
15 <strong py:match="B|b">${select('*|text()')}</strong> | |
16 <em py:match="I|i">${select('*|text()')}</em> | |
17 | |
18 <!--! Include the actual HTML stream, which will be processed by the rules | |
19 defined above --> | |
20 ${input} | |
21 | |
22 </html> |