A simple Example - Template

simple.xml:
<?xml version="1.0" ?>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" 
    xmlns="http://www.w3.org/1999/xhtml">
    <head >
        <title tal:content="/document/header/title">
            Here comes the title
         </title>
    </head>
    <body>
        <h1 tal:content="/document/header/title"></h1>
        <p class="note">
            The layout of this HTML page is 
            defined doc2html-template.xhtml
        </p>
        <div class="content" tal:repeat="s1 /document/body/s1">
            <div class="s1">
                <h2 tal:content="$s1/@title">
                    S1 Title
                 </h2>
                <div tal:replace="structure $s1/node()"> 
                    content
                </div>
            </div>
        </div>
    </body>
</html>
 
A simple Example - Output © copyright 2005  Bitflux GmbH