<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:py="http://genshi.edgewall.org/">
<head>
  <title>${book.title}</title>
  <link rel="stylesheet" href="main.css" type="text/css" media="all" />
</head>
<body>
  <h1>Table of Contents</h1>
  <py:def function="tocEntry(node)">
    <div class="tocEntry-${node.depth}">
      <a href="${node.href}">${node.title}</a>
    </div>
    <py:for each="child in node.children">
    ${tocEntry(child)}
    </py:for>
  </py:def>
  <py:for each="child in book.get_toc_map_root().children">
  ${tocEntry(child)}
  </py:for>
</body>
</html>
