Edgewall Software

Changes between Version 3 and Version 4 of GenshiRecipes/HtmlTransform


Ignore:
Timestamp:
Jul 4, 2007, 5:11:47 PM (17 years ago)
Author:
cmlenz
Comment:

Syntax highlighting

Legend:

Unmodified
Added
Removed
Modified
  • GenshiRecipes/HtmlTransform

    v3 v4  
    66
    77{{{
    8 #!xml
     8#!text/html
    99<HTML>
    1010 <HEAD>
     
    3838 * Add a new `<div id="header">` at the top of the page that contains your site logo.
    3939
     40== Using Match Templates ==
     41
    4042To do that, first start with the following template:
    4143
    4244{{{
    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
    4746<html xmlns:py="http://genshi.edgewall.org/" py:strip="">
    4847
     
    8382    html_fileobj = open(html_filename)
    8483    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')
    8685    html_fileobj.close()
    8786
     
    9392
    9493{{{
    95 #!xml
     94#!text/html
    9695<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    9796    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     
    122121}}}
    123122
     123== Using the Transformer Filter ==
     124
     125TODO: write this
     126
    124127----
    125128See also: GenshiRecipes, [wiki:Documentation/xml-templates.html Genshi XML Template Language]