1[%# variables in this template
2  indexext    [string, e.g. '.html']
3  suitetitle  [string]
4  specroot    [uri string]
5  formatdir   [dir name string]
6  chapters    [list of struct]
7    .numstr     [string, e.g. '6.1.13']
8    .title      [string]
9    .testcount  [number]
10%]
11[% IF isXML %]
12<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
13<html xmlns="http://www.w3.org/1999/xhtml">
14[% ELSE %]
15<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
16<html>
17[% END %]
18 <head>
19  <title>[% suitetitle %]</title>
20  <style type="text/css">
21    @import "http://www.w3.org/StyleSheets/TR/base.css";
22    @import "[% IF formatdir %]../[% END %]indices.css";
23  </style>
24 </head>
25<body>
26  <h1>[% suitetitle %] By Chapter</h1>
27
28  <p>This index contains both
29    <a href="http://wiki.csswg.org/test/selftest">self-describing tests</a>
30    and reftests.
31    A separate <a href="reftest-toc[% indexext%]">alphabetical reftest index</a>
32    is provided for tests in <a href="http://wiki.csswg.org/test/reftest">reftest
33    format</a> along with the <a href="reftest.list">reftest manifest</a>.</p>
34
35  <table>
36[% FOREACH chapter IN chapters %]
37    <tbody id="s[% chapter.numstr %]">
38      <tr><th><a href="chapter-[% chapter.numstr %][% indexext %]">
39        [% (chapter.numstr.match('^\d')) ? 'Chapter' : 'Appendix' +%] [%+ chapter.numstr +%] -
40        [%+ chapter.title +%]</a></th>
41      <td>([% chapter.testcount +%] Tests)</td></tr>
42    </tbody>
43[% END %]
44  </table>
45</body>
46</html>