enhancement (not check) : using item.items() to also import attribute
of body/head (onLoad, ...) node (suggestion from another thread)
master.kid
<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'"
py:attrs="item.items()">
<title py:replace="''">Your title goes here</title>
<meta name="DC.title"
py:attrs="content=item.find('{http://www.w3.org/1999/xhtml}title').text"/>
<link rel="stylesheet" type="text/css" href="static/css/default.css"/>
<script src="/tg_js/MochiKit.js"></script>
<meta py:replace="item[:]"/>
</head>
<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
py:attrs="item.items()">
<div py:if="tg_flash" class="flash" py:content="tg_flash"></div>
<div py:replace="item[:]"/>
</body>
Tips :
* the way to copy the title in the "DC.title" meta tag
* the title node is removed when it's interpreted by kid, but display
if the file is read directly with htmlviewer