Mercurial > genshi > mirror
annotate examples/transform/template.xml @ 284:65a46e008098 stable-0.3.x
Ported [338], [343] and [345:349/trunk] to 0.3.x stable branch.
author | cmlenz |
---|---|
date | Thu, 12 Oct 2006 12:40:43 +0000 |
parents | 84168828b074 |
children |
rev | line source |
---|---|
107
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
1 <!DOCTYPE html |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
230 | 4 <html xmlns:py="http://genshi.edgewall.org/" py:strip=""> |
107
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
5 |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
6 <!--! Add a header DIV on top of every page with a logo image --> |
111
2368c3becc52
Some fixes and more unit tests for the XPath engine.
cmlenz
parents:
107
diff
changeset
|
7 <body py:match="BODY|body"> |
107
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
8 <div id="header"> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
9 <img src="logo.png" alt="Bad Style"/> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
10 </div> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
11 ${select('*')} |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
12 </body> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
13 |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
14 <!--! Use semantic instead of presentational tags for emphasis --> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
15 <strong py:match="B|b">${select('*|text()')}</strong> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
16 <em py:match="I|i">${select('*|text()')}</em> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
17 |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
18 <!--! Include the actual HTML stream, which will be processed by the rules |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
19 defined above --> |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
20 ${input} |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
21 |
8b6bd2d920c1
Add example that shows how to transform an HTML document.
cmlenz
parents:
diff
changeset
|
22 </html> |