Changes between Version 3 and Version 4 of GenshiRecipes/HtmlTransform
- Timestamp:
- Jul 4, 2007, 5:11:47 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiRecipes/HtmlTransform
v3 v4 6 6 7 7 {{{ 8 #! xml8 #!text/html 9 9 <HTML> 10 10 <HEAD> … … 38 38 * Add a new `<div id="header">` at the top of the page that contains your site logo. 39 39 40 == Using Match Templates == 41 40 42 To do that, first start with the following template: 41 43 42 44 {{{ 43 #!xml 44 <!DOCTYPE html 45 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 46 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 45 #!genshi 47 46 <html xmlns:py="http://genshi.edgewall.org/" py:strip=""> 48 47 … … 83 82 html_fileobj = open(html_filename) 84 83 html = HTMLParser(html_fileobj, html_filename) 85 print tmpl.generate(Context(input=html)).render('xhtml' )84 print tmpl.generate(Context(input=html)).render('xhtml', doctype='html') 86 85 html_fileobj.close() 87 86 … … 93 92 94 93 {{{ 95 #! xml94 #!text/html 96 95 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 97 96 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> … … 122 121 }}} 123 122 123 == Using the Transformer Filter == 124 125 TODO: write this 126 124 127 ---- 125 128 See also: GenshiRecipes, [wiki:Documentation/xml-templates.html Genshi XML Template Language]