Commits

fantasai  committed 8833d8e

add indexer

  • Participants
  • Parent commits 8b32607

Comments (0)

Files changed (6)

File cvs-import/CSS2.1-test-suite/Makefile

 	mkdir dist/xhtml1
 	mkdir dist/xhtml1print
 	#
+	# index the tests
+	#
+	perl catalog.pl tests/*.xht
+	cp data/indices.css dist/indices.css
+	#
 	# generate the tests in all supported formats, along with support files
 	#
 	perl generate.pl tests/*.xht
+	perl -pi -e 's/\.xht/\.htm/g' dist/html4/by-section.htm
 	cp -Lrv tests/support dist/html4/support
 	cp -Lrv tests/support dist/xhtml1/support
 	cp -Lrv tests/support dist/xhtml1print/support

File cvs-import/CSS2.1-test-suite/catalog.pl

+#!/usr/bin/perl -w
+
+use strict;
+use utf8;
+use lib 'lib';
+use indexer;
+
+indexer::init("http://www.w3.org/TR/CSS21/", "data/section-index.xht", "CSS 2.1 Test Suite: ");
+
+foreach my $file (@ARGV) {
+    $file =~ m/^tests\/(.+)\.xht$/os;
+    my $root = $1;
+    indexer::index($file, $root);
+}
+
+indexer::save("tests/by-section.xht");

File cvs-import/CSS2.1-test-suite/data/indices.css

+/* CSS for CSS Conformance Test Indices */
+/* Written by fantasai */
+
+/* Test Tables */
+
+  table {
+    border-collapse: collapse;
+  }
+
+  thead {
+    border-bottom: 0.2em solid;
+  }
+
+  tbody {
+    border: thin solid;
+    border-style: solid none;
+  }
+
+  tbody.ch {
+    border-top: 0.2em solid;
+  }
+  tbody.ch th {
+    font-weight: bold;
+  }
+
+  tbody th {
+    border-bottom: silver dotted thin;
+    background: #EEE;
+    color: black;
+    font-weight: normal;
+    font-style: italic;
+  }
+  tbody th :link {
+    color: gray;
+    background: transparent;
+  }
+  tbody th :visited {
+    color: #333;
+    background: transparent;
+  }
+
+  th, td {
+    padding: 0.1em;
+    text-align: left;
+    vertical-align: baseline;
+  }
+  
+  td {
+    padding-left: 3em;
+    text-indent: -1em;
+    font-size: smaller;
+  }
+
+  td abbr {
+    border: solid thin gray;
+    padding: 0 0.1em;
+  }
+  td abbr:hover {
+    background: white;
+    color: black;
+  }
+
+
+  tr:hover {
+    background: #F9F9F9;
+    color: navy;
+  }
+
+  th a,
+  td a {
+    text-decoration: none;
+  }
+  th a:hover,
+  td a:hover,
+  th a:focus,
+  td a:focus {
+    text-decoration: underline;
+  }

File cvs-import/CSS2.1-test-suite/data/section-index.xht

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS 2.1 Test Suite: Index by Section</title>
+  <style type="text/css">
+    @import "http://www.w3.org/StyleSheets/TR/base.css";
+    @import "../indices.css";
+  </style>
+ </head>
+ <body>
+
+  <h1>CSS2.1 Conformance Test Suite</h1>
+  <h2>Index by Section</h2>
+
+  <p>This index lists tests by associated spec section. Tests are listed in
+    <strong>strong</strong> in their primary section.</p>
+
+  <table>
+    <col id="test-column"/>
+    <col id="type-column"/>
+    <col id="flags-column"/>
+    <thead>
+      <tr>
+        <th>Test</th>
+        <th>Type</th>
+        <th>Flags</th>
+      </tr>
+    </thead>
+    <tbody id="s1" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html">1 About the CSS&nbsp;2.1 Specification</a></th></tr>
+      <!-- TESTS 1 <about.html> -->
+    </tbody>
+    <tbody id="s1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q1">1.1 CSS&nbsp;2.1 vs CSS&nbsp;2</a></th></tr>
+      <!-- TESTS 1.1 <about.html#q1> -->
+    </tbody>
+    <tbody id="s1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q2">1.2 Reading the specification</a></th></tr>
+      <!-- TESTS 1.2 <about.html#q2> -->
+    </tbody>
+    <tbody id="s1.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q3">1.3 How the specification is organized</a></th></tr>
+      <!-- TESTS 1.3 <about.html#q3> -->
+    </tbody>
+    <tbody id="s1.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q4">1.4 Conventions</a></th></tr>
+      <!-- TESTS 1.4 <about.html#q4> -->
+    </tbody>
+    <tbody id="s1.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q5">1.4.1 Document language elements and attributes</a></th></tr>
+      <!-- TESTS 1.4.1 <about.html#q5> -->
+    </tbody>
+    <tbody id="s1.4.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#property-defs">1.4.2 CSS property definitions</a></th></tr>
+      <!-- TESTS 1.4.2 <about.html#property-defs> -->
+    </tbody>
+    <tbody id="s1.4.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q7">1.4.2.1 Value</a></th></tr>
+      <!-- TESTS 1.4.2.1 <about.html#q7> -->
+    </tbody>
+    <tbody id="s1.4.2.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#initial-value">1.4.2.2 Initial</a></th></tr>
+      <!-- TESTS 1.4.2.2 <about.html#initial-value> -->
+    </tbody>
+    <tbody id="s1.4.2.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#applies-to">1.4.2.3 Applies to</a></th></tr>
+      <!-- TESTS 1.4.2.3 <about.html#applies-to> -->
+    </tbody>
+    <tbody id="s1.4.2.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q10">1.4.2.4 Inherited</a></th></tr>
+      <!-- TESTS 1.4.2.4 <about.html#q10> -->
+    </tbody>
+    <tbody id="s1.4.2.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q11">1.4.2.5 Percentage values</a></th></tr>
+      <!-- TESTS 1.4.2.5 <about.html#q11> -->
+    </tbody>
+    <tbody id="s1.4.2.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q12">1.4.2.6 Media groups</a></th></tr>
+      <!-- TESTS 1.4.2.6 <about.html#q12> -->
+    </tbody>
+    <tbody id="s1.4.2.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q13">1.4.2.7 Computed value</a></th></tr>
+      <!-- TESTS 1.4.2.7 <about.html#q13> -->
+    </tbody>
+    <tbody id="s1.4.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#shorthand">1.4.3 Shorthand properties</a></th></tr>
+      <!-- TESTS 1.4.3 <about.html#shorthand> -->
+    </tbody>
+    <tbody id="s1.4.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q15">1.4.4 Notes and examples</a></th></tr>
+      <!-- TESTS 1.4.4 <about.html#q15> -->
+    </tbody>
+    <tbody id="s1.4.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q16">1.4.5 Images and long descriptions</a></th></tr>
+      <!-- TESTS 1.4.5 <about.html#q16> -->
+    </tbody>
+    <tbody id="s1.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/about.html#q17">1.5 Acknowledgments</a></th></tr>
+      <!-- TESTS 1.5 <about.html#q17> -->
+    </tbody>
+    <tbody id="s2" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html">2 Introduction to CSS&nbsp;2.1</a></th></tr>
+      <!-- TESTS 2 <intro.html> -->
+    </tbody>
+    <tbody id="s2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html#q1">2.1 A brief CSS&nbsp;2.1 tutorial for HTML</a></th></tr>
+      <!-- TESTS 2.1 <intro.html#q1> -->
+    </tbody>
+    <tbody id="s2.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html#q2">2.2 A brief CSS&nbsp;2.1 tutorial for XML</a></th></tr>
+      <!-- TESTS 2.2 <intro.html#q2> -->
+    </tbody>
+    <tbody id="s2.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html#processing-model">2.3 The CSS&nbsp;2.1 processing model</a></th></tr>
+      <!-- TESTS 2.3 <intro.html#processing-model> -->
+    </tbody>
+    <tbody id="s2.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html#q4">2.3.1 The canvas</a></th></tr>
+      <!-- TESTS 2.3.1 <intro.html#q4> -->
+    </tbody>
+    <tbody id="s2.3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html#q5">2.3.2 CSS&nbsp;2.1 addressing model</a></th></tr>
+      <!-- TESTS 2.3.2 <intro.html#q5> -->
+    </tbody>
+    <tbody id="s2.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/intro.html#q6">2.4 CSS design principles</a></th></tr>
+      <!-- TESTS 2.4 <intro.html#q6> -->
+    </tbody>
+    <tbody id="s3" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/conform.html">3 Conformance: Requirements and Recommendations</a></th></tr>
+      <!-- TESTS 3 <conform.html> -->
+    </tbody>
+    <tbody id="s3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/conform.html#q1">3.1 Definitions</a></th></tr>
+      <!-- TESTS 3.1 <conform.html#q1> -->
+    </tbody>
+    <tbody id="s3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/conform.html#conformance">3.2 UA Conformance</a></th></tr>
+      <!-- TESTS 3.2 <conform.html#conformance> -->
+    </tbody>
+    <tbody id="s3.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/conform.html#q3">3.3 Error conditions</a></th></tr>
+      <!-- TESTS 3.3 <conform.html#q3> -->
+    </tbody>
+    <tbody id="s3.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/conform.html#text-css">3.4 <span class="index-def" title="text/css">The text/css content type</span></a></th></tr>
+      <!-- TESTS 3.4 <conform.html#text-css> -->
+    </tbody>
+    <tbody id="s4" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html">4 Syntax and basic data types</a></th></tr>
+      <!-- TESTS 4 <syndata.html> -->
+    </tbody>
+    <tbody id="s4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#syntax">4.1 Syntax</a></th></tr>
+      <!-- TESTS 4.1 <syndata.html#syntax> -->
+    </tbody>
+    <tbody id="s4.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">4.1.1 Tokenization</a></th></tr>
+      <!-- TESTS 4.1.1 <syndata.html#tokenization> -->
+    </tbody>
+    <tbody id="s4.1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#keywords">4.1.2 Keywords</a></th></tr>
+      <!-- TESTS 4.1.2 <syndata.html#keywords> -->
+    </tbody>
+    <tbody id="s4.1.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q4">4.1.2.1 Vendor-specific extensions</a></th></tr>
+      <!-- TESTS 4.1.2.1 <syndata.html#q4> -->
+    </tbody>
+    <tbody id="s4.1.2.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q5">4.1.2.2 Informative Historical Notes</a></th></tr>
+      <!-- TESTS 4.1.2.2 <syndata.html#q5> -->
+    </tbody>
+    <tbody id="s4.1.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q6">4.1.3 Characters and case</a></th></tr>
+      <!-- TESTS 4.1.3 <syndata.html#q6> -->
+    </tbody>
+    <tbody id="s4.1.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q7">4.1.4 Statements</a></th></tr>
+      <!-- TESTS 4.1.4 <syndata.html#q7> -->
+    </tbody>
+    <tbody id="s4.1.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">4.1.5 <span class="index-def" title="at-rule"> At-rules</span></a></th></tr>
+      <!-- TESTS 4.1.5 <syndata.html#at-rules> -->
+    </tbody>
+    <tbody id="s4.1.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#block">4.1.6 Blocks</a></th></tr>
+      <!-- TESTS 4.1.6 <syndata.html#block> -->
+    </tbody>
+    <tbody id="s4.1.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q10">4.1.7 Rule sets, declaration blocks, and selectors</a></th></tr>
+      <!-- TESTS 4.1.7 <syndata.html#q10> -->
+    </tbody>
+    <tbody id="s4.1.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#declaration">4.1.8 Declarations and properties</a></th></tr>
+      <!-- TESTS 4.1.8 <syndata.html#declaration> -->
+    </tbody>
+    <tbody id="s4.1.9">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#comments">4.1.9 Comments</a></th></tr>
+      <!-- TESTS 4.1.9 <syndata.html#comments> -->
+    </tbody>
+    <tbody id="s4.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors">4.2 Rules for handling parsing errors</a></th></tr>
+      <!-- TESTS 4.2 <syndata.html#parsing-errors> -->
+    </tbody>
+    <tbody id="s4.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#values">4.3 Values</a></th></tr>
+      <!-- TESTS 4.3 <syndata.html#values> -->
+    </tbody>
+    <tbody id="s4.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q15">4.3.1 Integers and real numbers</a></th></tr>
+      <!-- TESTS 4.3.1 <syndata.html#q15> -->
+    </tbody>
+    <tbody id="s4.3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#length-units">4.3.2 Lengths</a></th></tr>
+      <!-- TESTS 4.3.2 <syndata.html#length-units> -->
+    </tbody>
+    <tbody id="s4.3.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#percentage-units">4.3.3 Percentages</a></th></tr>
+      <!-- TESTS 4.3.3 <syndata.html#percentage-units> -->
+    </tbody>
+    <tbody id="s4.3.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#uri">4.3.4 URLs and URIs</a></th></tr>
+      <!-- TESTS 4.3.4 <syndata.html#uri> -->
+    </tbody>
+    <tbody id="s4.3.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#counter">4.3.5 Counters</a></th></tr>
+      <!-- TESTS 4.3.5 <syndata.html#counter> -->
+    </tbody>
+    <tbody id="s4.3.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#color-units">4.3.6 Colors</a></th></tr>
+      <!-- TESTS 4.3.6 <syndata.html#color-units> -->
+    </tbody>
+    <tbody id="s4.3.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#strings">4.3.7 Strings</a></th></tr>
+      <!-- TESTS 4.3.7 <syndata.html#strings> -->
+    </tbody>
+    <tbody id="s4.3.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q22">4.3.8 Unsupported Values</a></th></tr>
+      <!-- TESTS 4.3.8 <syndata.html#q22> -->
+    </tbody>
+    <tbody id="s4.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q23">4.4 CSS style sheet representation</a></th></tr>
+      <!-- TESTS 4.4 <syndata.html#q23> -->
+    </tbody>
+    <tbody id="s4.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/syndata.html#q24">4.4.1 Referring to characters not represented in a character encoding</a></th></tr>
+      <!-- TESTS 4.4.1 <syndata.html#q24> -->
+    </tbody>
+    <tbody id="s5" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html">5 Selectors</a></th></tr>
+      <!-- TESTS 5 <selector.html> -->
+    </tbody>
+    <tbody id="s5.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#q1">5.1 Pattern matching</a></th></tr>
+      <!-- TESTS 5.1 <selector.html#q1> -->
+    </tbody>
+    <tbody id="s5.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#q2">5.2 Selector syntax</a></th></tr>
+      <!-- TESTS 5.2 <selector.html#q2> -->
+    </tbody>
+    <tbody id="s5.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#grouping">5.2.1 Grouping</a></th></tr>
+      <!-- TESTS 5.2.1 <selector.html#grouping> -->
+    </tbody>
+    <tbody id="s5.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#universal-selector">5.3 Universal selector</a></th></tr>
+      <!-- TESTS 5.3 <selector.html#universal-selector> -->
+    </tbody>
+    <tbody id="s5.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#type-selectors">5.4 Type selectors</a></th></tr>
+      <!-- TESTS 5.4 <selector.html#type-selectors> -->
+    </tbody>
+    <tbody id="s5.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#descendant-selectors">5.5 Descendant selectors</a></th></tr>
+      <!-- TESTS 5.5 <selector.html#descendant-selectors> -->
+    </tbody>
+    <tbody id="s5.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#child-selectors">5.6 Child selectors</a></th></tr>
+      <!-- TESTS 5.6 <selector.html#child-selectors> -->
+    </tbody>
+    <tbody id="s5.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors">5.7 Adjacent sibling selectors</a></th></tr>
+      <!-- TESTS 5.7 <selector.html#adjacent-selectors> -->
+    </tbody>
+    <tbody id="s5.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors">5.8 Attribute selectors</a></th></tr>
+      <!-- TESTS 5.8 <selector.html#attribute-selectors> -->
+    </tbody>
+    <tbody id="s5.8.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#q10">5.8.1 Matching attributes and attribute values</a></th></tr>
+      <!-- TESTS 5.8.1 <selector.html#q10> -->
+    </tbody>
+    <tbody id="s5.8.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#q11">5.8.2 Default attribute values in DTDs</a></th></tr>
+      <!-- TESTS 5.8.2 <selector.html#q11> -->
+    </tbody>
+    <tbody id="s5.8.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#class-html">5.8.3 Class selectors</a></th></tr>
+      <!-- TESTS 5.8.3 <selector.html#class-html> -->
+    </tbody>
+    <tbody id="s5.9">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#id-selectors">5.9 ID selectors</a></th></tr>
+      <!-- TESTS 5.9 <selector.html#id-selectors> -->
+    </tbody>
+    <tbody id="s5.10">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#pseudo-elements">5.10 Pseudo-elements and pseudo-classes</a></th></tr>
+      <!-- TESTS 5.10 <selector.html#pseudo-elements> -->
+    </tbody>
+    <tbody id="s5.11">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#q15">5.11 Pseudo-classes</a></th></tr>
+      <!-- TESTS 5.11 <selector.html#q15> -->
+    </tbody>
+    <tbody id="s5.11.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#first-child">5.11.1 :first-child pseudo-class</a></th></tr>
+      <!-- TESTS 5.11.1 <selector.html#first-child> -->
+    </tbody>
+    <tbody id="s5.11.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#link-pseudo-classes">5.11.2 The link pseudo-classes: <span class="index-def" title="pseudo-classes:::link|:link|link (pseudo-class)">:link</span> and <span class="index-def" title="pseudo-classes:::visited|:visited|visited (pseudo-class)">:visited</span></a></th></tr>
+      <!-- TESTS 5.11.2 <selector.html#link-pseudo-classes> -->
+    </tbody>
+    <tbody id="s5.11.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes">5.11.3 The dynamic pseudo-classes: <span class="index-def" title="pseudo-classes:::hover|:hover|hover (pseudo-class)">:hover</span>, <span class="index-def" title="pseudo-classes:::active|:active|active (pseudo-class)">:active</span>, and <span class="index-def" title="pseudo-classes:::focus|:focus|focus (pseudo-class)">:focus</span></a></th></tr>
+      <!-- TESTS 5.11.3 <selector.html#dynamic-pseudo-classes> -->
+    </tbody>
+    <tbody id="s5.11.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#lang">5.11.4 The language pseudo-class: <span class="index-def" title="pseudo-classes:::lang|:lang|lang (pseudo-class)">:lang</span></a></th></tr>
+      <!-- TESTS 5.11.4 <selector.html#lang> -->
+    </tbody>
+    <tbody id="s5.12">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#q20">5.12 Pseudo-elements</a></th></tr>
+      <!-- TESTS 5.12 <selector.html#q20> -->
+    </tbody>
+    <tbody id="s5.12.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo">5.12.1 The <span class="index-def" title="pseudo-elements:::first-line|:first-line|first-line">:first-line</span> pseudo-element</a></th></tr>
+      <!-- TESTS 5.12.1 <selector.html#first-line-pseudo> -->
+    </tbody>
+    <tbody id="s5.12.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#first-letter">5.12.2 The <span class="index-def" title="pseudo-elements:::first-letter|:first-letter|first-letter">:first-letter</span> pseudo-element</a></th></tr>
+      <!-- TESTS 5.12.2 <selector.html#first-letter> -->
+    </tbody>
+    <tbody id="s5.12.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/selector.html#before-and-after">5.12.3 The <span class="index-def" title="pseudo-elements:::before|:before">:before</span> and <span class="index-def" title="pseudo-elements:::after|:after">:after</span> pseudo-elements</a></th></tr>
+      <!-- TESTS 5.12.3 <selector.html#before-and-after> -->
+    </tbody>
+    <tbody id="s6" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html">6 Assigning property values, Cascading, and Inheritance</a></th></tr>
+      <!-- TESTS 6 <cascade.html> -->
+    </tbody>
+    <tbody id="s6.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#q1">6.1 Specified, computed, and actual values</a></th></tr>
+      <!-- TESTS 6.1 <cascade.html#q1> -->
+    </tbody>
+    <tbody id="s6.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#specified-value">6.1.1 <span class="index-def" title="specified value"> Specified values</span></a></th></tr>
+      <!-- TESTS 6.1.1 <cascade.html#specified-value> -->
+    </tbody>
+    <tbody id="s6.1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#computed-value">6.1.2 <span class="index-def" title="computed value"> Computed values</span></a></th></tr>
+      <!-- TESTS 6.1.2 <cascade.html#computed-value> -->
+    </tbody>
+    <tbody id="s6.1.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#used-value">6.1.3 <span class="index-def" title="used value"> Used values</span></a></th></tr>
+      <!-- TESTS 6.1.3 <cascade.html#used-value> -->
+    </tbody>
+    <tbody id="s6.1.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#actual-value">6.1.4 <span class="index-def" title="actual value"> Actual values</span></a></th></tr>
+      <!-- TESTS 6.1.4 <cascade.html#actual-value> -->
+    </tbody>
+    <tbody id="s6.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#inheritance">6.2 Inheritance</a></th></tr>
+      <!-- TESTS 6.2 <cascade.html#inheritance> -->
+    </tbody>
+    <tbody id="s6.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">6.2.1 The <span class="index-def" title="inherit, definition of">'inherit'</span> value</a></th></tr>
+      <!-- TESTS 6.2.1 <cascade.html#value-def-inherit> -->
+    </tbody>
+    <tbody id="s6.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#at-import">6.3 The @import rule</a></th></tr>
+      <!-- TESTS 6.3 <cascade.html#at-import> -->
+    </tbody>
+    <tbody id="s6.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#cascade">6.4 The cascade</a></th></tr>
+      <!-- TESTS 6.4 <cascade.html#cascade> -->
+    </tbody>
+    <tbody id="s6.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#cascading-order">6.4.1 Cascading order</a></th></tr>
+      <!-- TESTS 6.4.1 <cascade.html#cascading-order> -->
+    </tbody>
+    <tbody id="s6.4.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#important-rules">6.4.2 !important rules</a></th></tr>
+      <!-- TESTS 6.4.2 <cascade.html#important-rules> -->
+    </tbody>
+    <tbody id="s6.4.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#specificity">6.4.3 Calculating a selector's specificity</a></th></tr>
+      <!-- TESTS 6.4.3 <cascade.html#specificity> -->
+    </tbody>
+    <tbody id="s6.4.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/cascade.html#q13">6.4.4 Precedence of non-CSS presentational hints</a></th></tr>
+      <!-- TESTS 6.4.4 <cascade.html#q13> -->
+    </tbody>
+    <tbody id="s7" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/media.html">7 Media types</a></th></tr>
+      <!-- TESTS 7 <media.html> -->
+    </tbody>
+    <tbody id="s7.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/media.html#q1">7.1 Introduction to media types</a></th></tr>
+      <!-- TESTS 7.1 <media.html#q1> -->
+    </tbody>
+    <tbody id="s7.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/media.html#q2">7.2 Specifying media-dependent style sheets</a></th></tr>
+      <!-- TESTS 7.2 <media.html#q2> -->
+    </tbody>
+    <tbody id="s7.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/media.html#at-media-rule">7.2.1 The @media rule</a></th></tr>
+      <!-- TESTS 7.2.1 <media.html#at-media-rule> -->
+    </tbody>
+    <tbody id="s7.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/media.html#media-types">7.3 Recognized media types</a></th></tr>
+      <!-- TESTS 7.3 <media.html#media-types> -->
+    </tbody>
+    <tbody id="s7.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/media.html#media-groups">7.3.1 Media groups</a></th></tr>
+      <!-- TESTS 7.3.1 <media.html#media-groups> -->
+    </tbody>
+    <tbody id="s8" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html">8 Box model</a></th></tr>
+      <!-- TESTS 8 <box.html> -->
+    </tbody>
+    <tbody id="s8.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#box-dimensions">8.1 Box dimensions</a></th></tr>
+      <!-- TESTS 8.1 <box.html#box-dimensions> -->
+    </tbody>
+    <tbody id="s8.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#mpb-examples">8.2 Example of margins, padding, and borders</a></th></tr>
+      <!-- TESTS 8.2 <box.html#mpb-examples> -->
+    </tbody>
+    <tbody id="s8.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#margin-properties">8.3 Margin properties: <span class="propinst-margin-top">'margin-top'</span>,  <span class="propinst-margin-right">'margin-right'</span>,  <span class="propinst-margin-bottom">'margin-bottom'</span>, <span class="propinst-margin-left">'margin-left'</span>, and <span class="propinst-margin">'margin'</span></a></th></tr>
+      <!-- TESTS 8.3 <box.html#margin-properties> -->
+    </tbody>
+    <tbody id="s8.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">8.3.1 Collapsing margins</a></th></tr>
+      <!-- TESTS 8.3.1 <box.html#collapsing-margins> -->
+    </tbody>
+    <tbody id="s8.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#padding-properties">8.4 Padding properties: <span class="propinst-padding-top">'padding-top'</span>, <span class="propinst-padding-right">'padding-right'</span>, <span class="propinst-padding-bottom">'padding-bottom'</span>, <span class="propinst-padding-left">'padding-left'</span>, and <span class="propinst-padding">'padding'</span></a></th></tr>
+      <!-- TESTS 8.4 <box.html#padding-properties> -->
+    </tbody>
+    <tbody id="s8.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#border-properties">8.5 Border properties</a></th></tr>
+      <!-- TESTS 8.5 <box.html#border-properties> -->
+    </tbody>
+    <tbody id="s8.5.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#border-width-properties">8.5.1 Border width: <span class="propinst-border-top-width">'border-top-width'</span>, <span class="propinst-border-right-width">'border-right-width'</span>, <span class="propinst-border-bottom-width">'border-bottom-width'</span>, <span class="propinst-border-left-width">'border-left-width'</span>, and <span class="propinst-border-width">'border-width'</span></a></th></tr>
+      <!-- TESTS 8.5.1 <box.html#border-width-properties> -->
+    </tbody>
+    <tbody id="s8.5.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#border-color-properties">8.5.2 Border color: <span class="propinst-border-top-color">'border-top-color'</span>, <span class="propinst-border-right-color">'border-right-color'</span>, <span class="propinst-border-bottom-color">'border-bottom-color'</span>, <span class="propinst-border-left-color">'border-left-color'</span>, and <span class="propinst-border-color">'border-color'</span></a></th></tr>
+      <!-- TESTS 8.5.2 <box.html#border-color-properties> -->
+    </tbody>
+    <tbody id="s8.5.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#border-style-properties">8.5.3 Border style: <span class="propinst-border-top-style">'border-top-style'</span>, <span class="propinst-border-right-style">'border-right-style'</span>, <span class="propinst-border-bottom-style">'border-bottom-style'</span>, <span class="propinst-border-left-style">'border-left-style'</span>, and <span class="propinst-border-style">'border-style'</span></a></th></tr>
+      <!-- TESTS 8.5.3 <box.html#border-style-properties> -->
+    </tbody>
+    <tbody id="s8.5.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#border-shorthand-properties">8.5.4 Border shorthand properties: <span class="propinst-border-top">'border-top'</span>, <span class="propinst-border-right">'border-right'</span>, <span class="propinst-border-bottom">'border-bottom'</span>, <span class="propinst-border-left">'border-left'</span>, and <span class="propinst-border">'border'</span></a></th></tr>
+      <!-- TESTS 8.5.4 <box.html#border-shorthand-properties> -->
+    </tbody>
+    <tbody id="s8.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/box.html#q11">8.6 The box model for inline elements in bidirection context</a></th></tr>
+      <!-- TESTS 8.6 <box.html#q11> -->
+    </tbody>
+    <tbody id="s9" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html">9 Visual formatting model</a></th></tr>
+      <!-- TESTS 9 <visuren.html> -->
+    </tbody>
+    <tbody id="s9.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q1">9.1 Introduction to the visual formatting model</a></th></tr>
+      <!-- TESTS 9.1 <visuren.html#q1> -->
+    </tbody>
+    <tbody id="s9.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q2">9.1.1 The viewport</a></th></tr>
+      <!-- TESTS 9.1.1 <visuren.html#q2> -->
+    </tbody>
+    <tbody id="s9.1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#containing-block">9.1.2 <span class="index-def" title="containing block"> Containing blocks</span></a></th></tr>
+      <!-- TESTS 9.1.2 <visuren.html#containing-block> -->
+    </tbody>
+    <tbody id="s9.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#box-gen">9.2 Controlling box generation</a></th></tr>
+      <!-- TESTS 9.2 <visuren.html#box-gen> -->
+    </tbody>
+    <tbody id="s9.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q5">9.2.1 Block-level elements and block boxes</a></th></tr>
+      <!-- TESTS 9.2.1 <visuren.html#q5> -->
+    </tbody>
+    <tbody id="s9.2.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">9.2.1.1 Anonymous block boxes</a></th></tr>
+      <!-- TESTS 9.2.1.1 <visuren.html#anonymous-block-level> -->
+    </tbody>
+    <tbody id="s9.2.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q7">9.2.2 Inline-level elements and inline boxes</a></th></tr>
+      <!-- TESTS 9.2.2 <visuren.html#q7> -->
+    </tbody>
+    <tbody id="s9.2.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous">9.2.2.1 Anonymous inline boxes</a></th></tr>
+      <!-- TESTS 9.2.2.1 <visuren.html#anonymous> -->
+    </tbody>
+    <tbody id="s9.2.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#run-in">9.2.3 Run-in boxes</a></th></tr>
+      <!-- TESTS 9.2.3 <visuren.html#run-in> -->
+    </tbody>
+    <tbody id="s9.2.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#display-prop">9.2.4 The <span class="propinst-display">'display'</span> property</a></th></tr>
+      <!-- TESTS 9.2.4 <visuren.html#display-prop> -->
+    </tbody>
+    <tbody id="s9.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#positioning-scheme">9.3 Positioning schemes</a></th></tr>
+      <!-- TESTS 9.3 <visuren.html#positioning-scheme> -->
+    </tbody>
+    <tbody id="s9.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#choose-position">9.3.1 Choosing a positioning scheme: <span class="propinst-position">'position'</span> property</a></th></tr>
+      <!-- TESTS 9.3.1 <visuren.html#choose-position> -->
+    </tbody>
+    <tbody id="s9.3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#position-props">9.3.2 Box offsets: <span class="propinst-top">'top'</span>, <span class="propinst-right">'right'</span>, <span class="propinst-bottom">'bottom'</span>, <span class="propinst-left">'left'</span></a></th></tr>
+      <!-- TESTS 9.3.2 <visuren.html#position-props> -->
+    </tbody>
+    <tbody id="s9.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#normal-flow">9.4 Normal flow</a></th></tr>
+      <!-- TESTS 9.4 <visuren.html#normal-flow> -->
+    </tbody>
+    <tbody id="s9.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q15">9.4.1 Block formatting contexts</a></th></tr>
+      <!-- TESTS 9.4.1 <visuren.html#q15> -->
+    </tbody>
+    <tbody id="s9.4.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#inline-formatting">9.4.2 Inline formatting context</a></th></tr>
+      <!-- TESTS 9.4.2 <visuren.html#inline-formatting> -->
+    </tbody>
+    <tbody id="s9.4.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning">9.4.3 Relative positioning</a></th></tr>
+      <!-- TESTS 9.4.3 <visuren.html#relative-positioning> -->
+    </tbody>
+    <tbody id="s9.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#floats">9.5 Floats</a></th></tr>
+      <!-- TESTS 9.5 <visuren.html#floats> -->
+    </tbody>
+    <tbody id="s9.5.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#float-position">9.5.1 Positioning the float: the <span class="propinst-float">'float'</span> property</a></th></tr>
+      <!-- TESTS 9.5.1 <visuren.html#float-position> -->
+    </tbody>
+    <tbody id="s9.5.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#flow-control">9.5.2 Controlling flow next to floats: the <span class="propinst-clear">'clear'</span> property</a></th></tr>
+      <!-- TESTS 9.5.2 <visuren.html#flow-control> -->
+    </tbody>
+    <tbody id="s9.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning">9.6 Absolute positioning</a></th></tr>
+      <!-- TESTS 9.6 <visuren.html#absolute-positioning> -->
+    </tbody>
+    <tbody id="s9.6.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning">9.6.1 Fixed positioning</a></th></tr>
+      <!-- TESTS 9.6.1 <visuren.html#fixed-positioning> -->
+    </tbody>
+    <tbody id="s9.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo">9.7 Relationships between 'display', 'position', and 'float'</a></th></tr>
+      <!-- TESTS 9.7 <visuren.html#dis-pos-flo> -->
+    </tbody>
+    <tbody id="s9.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#comparison">9.8 Comparison of normal flow, floats,   and absolute positioning</a></th></tr>
+      <!-- TESTS 9.8 <visuren.html#comparison> -->
+    </tbody>
+    <tbody id="s9.8.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q25">9.8.1 Normal flow</a></th></tr>
+      <!-- TESTS 9.8.1 <visuren.html#q25> -->
+    </tbody>
+    <tbody id="s9.8.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q26">9.8.2 Relative positioning</a></th></tr>
+      <!-- TESTS 9.8.2 <visuren.html#q26> -->
+    </tbody>
+    <tbody id="s9.8.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q27">9.8.3 Floating a box</a></th></tr>
+      <!-- TESTS 9.8.3 <visuren.html#q27> -->
+    </tbody>
+    <tbody id="s9.8.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q28">9.8.4 Absolute positioning</a></th></tr>
+      <!-- TESTS 9.8.4 <visuren.html#q28> -->
+    </tbody>
+    <tbody id="s9.9">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#q29">9.9 Layered presentation</a></th></tr>
+      <!-- TESTS 9.9 <visuren.html#q29> -->
+    </tbody>
+    <tbody id="s9.9.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#z-index">9.9.1 Specifying the stack level: the <span class="propinst-z-index">'z-index'</span> property</a></th></tr>
+      <!-- TESTS 9.9.1 <visuren.html#z-index> -->
+    </tbody>
+    <tbody id="s9.10">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visuren.html#direction">9.10 Text direction: the <span class="propinst-direction">'direction'</span> and <span class="propinst-unicode-bidi">'unicode-bidi'</span> properties</a></th></tr>
+      <!-- TESTS 9.10 <visuren.html#direction> -->
+    </tbody>
+    <tbody id="s10" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html">10 Visual formatting model details</a></th></tr>
+      <!-- TESTS 10 <visudet.html> -->
+    </tbody>
+    <tbody id="s10.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">10.1 Definition of "containing block"</a></th></tr>
+      <!-- TESTS 10.1 <visudet.html#containing-block-details> -->
+    </tbody>
+    <tbody id="s10.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">10.2 Content width: the <span class="propinst-width">'width'</span> property</a></th></tr>
+      <!-- TESTS 10.2 <visudet.html#the-width-property> -->
+    </tbody>
+    <tbody id="s10.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins">10.3 Calculating widths and margins</a></th></tr>
+      <!-- TESTS 10.3 <visudet.html#Computing_widths_and_margins> -->
+    </tbody>
+    <tbody id="s10.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q4">10.3.1 Inline, non-replaced elements</a></th></tr>
+      <!-- TESTS 10.3.1 <visudet.html#q4> -->
+    </tbody>
+    <tbody id="s10.3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width">10.3.2 Inline, replaced elements</a></th></tr>
+      <!-- TESTS 10.3.2 <visudet.html#inline-replaced-width> -->
+    </tbody>
+    <tbody id="s10.3.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">10.3.3 Block-level, non-replaced elements in normal flow</a></th></tr>
+      <!-- TESTS 10.3.3 <visudet.html#blockwidth> -->
+    </tbody>
+    <tbody id="s10.3.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q7">10.3.4 Block-level, replaced elements in normal flow</a></th></tr>
+      <!-- TESTS 10.3.4 <visudet.html#q7> -->
+    </tbody>
+    <tbody id="s10.3.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q8">10.3.5 Floating, non-replaced elements</a></th></tr>
+      <!-- TESTS 10.3.5 <visudet.html#q8> -->
+    </tbody>
+    <tbody id="s10.3.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q9">10.3.6 Floating, replaced elements</a></th></tr>
+      <!-- TESTS 10.3.6 <visudet.html#q9> -->
+    </tbody>
+    <tbody id="s10.3.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">10.3.7 Absolutely positioned, non-replaced elements</a></th></tr>
+      <!-- TESTS 10.3.7 <visudet.html#abs-non-replaced-width> -->
+    </tbody>
+    <tbody id="s10.3.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width">10.3.8 Absolutely positioned, replaced elements</a></th></tr>
+      <!-- TESTS 10.3.8 <visudet.html#abs-replaced-width> -->
+    </tbody>
+    <tbody id="s10.3.9">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q12">10.3.9 'Inline-block', non-replaced elements in normal flow</a></th></tr>
+      <!-- TESTS 10.3.9 <visudet.html#q12> -->
+    </tbody>
+    <tbody id="s10.3.10">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q13">10.3.10 'Inline-block', replaced elements in normal flow</a></th></tr>
+      <!-- TESTS 10.3.10 <visudet.html#q13> -->
+    </tbody>
+    <tbody id="s10.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths">10.4 Minimum and maximum widths: <span class="propinst-min-width">'min-width'</span> and <span class="propinst-max-width">'max-width'</span></a></th></tr>
+      <!-- TESTS 10.4 <visudet.html#min-max-widths> -->
+    </tbody>
+    <tbody id="s10.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property">10.5 Content height: the <span class="propinst-height">'height'</span> property</a></th></tr>
+      <!-- TESTS 10.5 <visudet.html#the-height-property> -->
+    </tbody>
+    <tbody id="s10.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#Computing_heights_and_margins">10.6 Calculating heights and margins</a></th></tr>
+      <!-- TESTS 10.6 <visudet.html#Computing_heights_and_margins> -->
+    </tbody>
+    <tbody id="s10.6.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#inline-non-replaced">10.6.1 Inline, non-replaced elements</a></th></tr>
+      <!-- TESTS 10.6.1 <visudet.html#inline-non-replaced> -->
+    </tbody>
+    <tbody id="s10.6.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height">10.6.2 Inline replaced elements, block-level replaced elements in normal flow, 'inline-block' replaced elements in normal flow and floating replaced elements</a></th></tr>
+      <!-- TESTS 10.6.2 <visudet.html#inline-replaced-height> -->
+    </tbody>
+    <tbody id="s10.6.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#normal-block">10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'</a></th></tr>
+      <!-- TESTS 10.6.3 <visudet.html#normal-block> -->
+    </tbody>
+    <tbody id="s10.6.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height">10.6.4 Absolutely positioned, non-replaced elements</a></th></tr>
+      <!-- TESTS 10.6.4 <visudet.html#abs-non-replaced-height> -->
+    </tbody>
+    <tbody id="s10.6.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height">10.6.5 Absolutely positioned, replaced elements</a></th></tr>
+      <!-- TESTS 10.6.5 <visudet.html#abs-replaced-height> -->
+    </tbody>
+    <tbody id="s10.6.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q22">10.6.6 Complicated cases</a></th></tr>
+      <!-- TESTS 10.6.6 <visudet.html#q22> -->
+    </tbody>
+    <tbody id="s10.6.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#root-height">10.6.7 'Auto' heights for block formatting context roots</a></th></tr>
+      <!-- TESTS 10.6.7 <visudet.html#root-height> -->
+    </tbody>
+    <tbody id="s10.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-heights">10.7 Minimum and maximum heights: <span class="propinst-min-height">'min-height'</span> and <span class="propinst-max-height">'max-height'</span></a></th></tr>
+      <!-- TESTS 10.7 <visudet.html#min-max-heights> -->
+    </tbody>
+    <tbody id="s10.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#line-height">10.8 Line height calculations: the <span class="propinst-line-height">'line-height'</span> and <span class="propinst-vertical-align">'vertical-align'</span> properties</a></th></tr>
+      <!-- TESTS 10.8 <visudet.html#line-height> -->
+    </tbody>
+    <tbody id="s10.8.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visudet.html#q26">10.8.1 Leading and half-leading</a></th></tr>
+      <!-- TESTS 10.8.1 <visudet.html#q26> -->
+    </tbody>
+    <tbody id="s11" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visufx.html">11 Visual effects</a></th></tr>
+      <!-- TESTS 11 <visufx.html> -->
+    </tbody>
+    <tbody id="s11.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping">11.1 Overflow and clipping</a></th></tr>
+      <!-- TESTS 11.1 <visufx.html#overflow-clipping> -->
+    </tbody>
+    <tbody id="s11.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visufx.html#overflow">11.1.1 Overflow: the <span class="propinst-overflow">'overflow'</span> property</a></th></tr>
+      <!-- TESTS 11.1.1 <visufx.html#overflow> -->
+    </tbody>
+    <tbody id="s11.1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visufx.html#clipping">11.1.2 Clipping: the <span class="propinst-clip">'clip'</span> property</a></th></tr>
+      <!-- TESTS 11.1.2 <visufx.html#clipping> -->
+    </tbody>
+    <tbody id="s11.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/visufx.html#visibility">11.2 Visibility: the <span class="propinst-visibility">'visibility'</span> property</a></th></tr>
+      <!-- TESTS 11.2 <visufx.html#visibility> -->
+    </tbody>
+    <tbody id="s12" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html">12 Generated <span class="index-def" title="generated content">content</span>, automatic <span class="index-def" title="automatic numbering">numbering</span>, and lists</a></th></tr>
+      <!-- TESTS 12 <generate.html> -->
+    </tbody>
+    <tbody id="s12.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#before-after-content">12.1 The <span class="index-def" title=":before|pseudo-elements:::before|before">:before</span> and <span class="index-def" title=":after|pseudo-elements:::after|after">:after</span> pseudo-elements</a></th></tr>
+      <!-- TESTS 12.1 <generate.html#before-after-content> -->
+    </tbody>
+    <tbody id="s12.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#content">12.2 The <span class="propinst-content">'content'</span> property</a></th></tr>
+      <!-- TESTS 12.2 <generate.html#content> -->
+      <!-- TESTS 12.2 <generate.html#propdef-content> -->
+    </tbody>
+    <tbody id="s12.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#quotes">12.3 Quotation marks</a></th></tr>
+      <!-- TESTS 12.3 <generate.html#quotes> -->
+    </tbody>
+    <tbody id="s12.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#quotes-specify">12.3.1 Specifying quotes with the <span class="propinst-quotes">'quotes'</span> property</a></th></tr>
+      <!-- TESTS 12.3.1 <generate.html#quotes-specify> -->
+    </tbody>
+    <tbody id="s12.3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#quotes-insert">12.3.2 Inserting quotes with the <span class="propinst-content">'content'</span> property</a></th></tr>
+      <!-- TESTS 12.3.2 <generate.html#quotes-insert> -->
+    </tbody>
+    <tbody id="s12.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#counters">12.4 Automatic <span class="index-def" title="counters">counters</span> and numbering</a></th></tr>
+      <!-- TESTS 12.4 <generate.html#counters> -->
+    </tbody>
+    <tbody id="s12.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#scope">12.4.1 Nested counters and scope</a></th></tr>
+      <!-- TESTS 12.4.1 <generate.html#scope> -->
+    </tbody>
+    <tbody id="s12.4.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#counter-styles">12.4.2 Counter styles</a></th></tr>
+      <!-- TESTS 12.4.2 <generate.html#counter-styles> -->
+    </tbody>
+    <tbody id="s12.4.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#q9">12.4.3 Counters in elements with 'display: none'</a></th></tr>
+      <!-- TESTS 12.4.3 <generate.html#q9> -->
+    </tbody>
+    <tbody id="s12.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#q10">12.5 Lists</a></th></tr>
+      <!-- TESTS 12.5 <generate.html#q10> -->
+    </tbody>
+    <tbody id="s12.5.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/generate.html#lists">12.5.1 Lists: the <span class="propinst-list-style-type">'list-style-type'</span>, <span class="propinst-list-style-image">'list-style-image'</span>, <span class="propinst-list-style-position">'list-style-position'</span>, and <span class="propinst-list-style">'list-style'</span> properties</a></th></tr>
+      <!-- TESTS 12.5.1 <generate.html#lists> -->
+    </tbody>
+    <tbody id="s13" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html">13 Paged media</a></th></tr>
+      <!-- TESTS 13 <page.html> -->
+    </tbody>
+    <tbody id="s13.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q1">13.1 Introduction to paged media</a></th></tr>
+      <!-- TESTS 13.1 <page.html#q1> -->
+    </tbody>
+    <tbody id="s13.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#page-box">13.2 Page boxes: the @page rule</a></th></tr>
+      <!-- TESTS 13.2 <page.html#page-box> -->
+    </tbody>
+    <tbody id="s13.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#page-margins">13.2.1 Page margins</a></th></tr>
+      <!-- TESTS 13.2.1 <page.html#page-margins> -->
+    </tbody>
+    <tbody id="s13.2.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q4">13.2.1.1 Rendering page boxes that do not fit a target sheet</a></th></tr>
+      <!-- TESTS 13.2.1.1 <page.html#q4> -->
+    </tbody>
+    <tbody id="s13.2.1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q5">13.2.1.2 Positioning the page box on the sheet</a></th></tr>
+      <!-- TESTS 13.2.1.2 <page.html#q5> -->
+    </tbody>
+    <tbody id="s13.2.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q6">13.2.2 Page selectors: selecting left, right, and first pages</a></th></tr>
+      <!-- TESTS 13.2.2 <page.html#q6> -->
+    </tbody>
+    <tbody id="s13.2.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q7">13.2.3 Content outside the page box</a></th></tr>
+      <!-- TESTS 13.2.3 <page.html#q7> -->
+    </tbody>
+    <tbody id="s13.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#page-breaks">13.3 Page breaks</a></th></tr>
+      <!-- TESTS 13.3 <page.html#page-breaks> -->
+    </tbody>
+    <tbody id="s13.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#page-break-props">13.3.1 Page break properties: <span class="propinst-page-break-before">'page-break-before'</span>, <span class="propinst-page-break-after">'page-break-after'</span>, <span class="propinst-page-break-inside">'page-break-inside'</span></a></th></tr>
+      <!-- TESTS 13.3.1 <page.html#page-break-props> -->
+    </tbody>
+    <tbody id="s13.3.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#break-inside">13.3.2 Breaks inside elements: <span class="propinst-orphans">'orphans'</span>, <span class="propinst-widows">'widows'</span></a></th></tr>
+      <!-- TESTS 13.3.2 <page.html#break-inside> -->
+    </tbody>
+    <tbody id="s13.3.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#allowed-page-breaks">13.3.3 Allowed page breaks</a></th></tr>
+      <!-- TESTS 13.3.3 <page.html#allowed-page-breaks> -->
+    </tbody>
+    <tbody id="s13.3.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#forced">13.3.4 Forced page breaks</a></th></tr>
+      <!-- TESTS 13.3.4 <page.html#forced> -->
+    </tbody>
+    <tbody id="s13.3.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q13">13.3.5 "Best" page breaks</a></th></tr>
+      <!-- TESTS 13.3.5 <page.html#q13> -->
+    </tbody>
+    <tbody id="s13.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/page.html#q14">13.4 Cascading in the page context</a></th></tr>
+      <!-- TESTS 13.4 <page.html#q14> -->
+    </tbody>
+    <tbody id="s14" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/colors.html">14 Colors and Backgrounds</a></th></tr>
+      <!-- TESTS 14 <colors.html> -->
+    </tbody>
+    <tbody id="s14.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/colors.html#colors">14.1 Foreground color: the <span class="propinst-color">'color'</span> property</a></th></tr>
+      <!-- TESTS 14.1 <colors.html#colors> -->
+    </tbody>
+    <tbody id="s14.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/colors.html#q2">14.2 The background</a></th></tr>
+      <!-- TESTS 14.2 <colors.html#q2> -->
+    </tbody>
+    <tbody id="s14.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/colors.html#background-properties">14.2.1 Background properties: <span class="propinst-background-color">'background-color'</span>, <span class="propinst-background-image">'background-image'</span>, <span class="propinst-background-repeat">'background-repeat'</span>, <span class="propinst-background-attachment">'background-attachment'</span>, <span class="propinst-background-position">'background-position'</span>, and <span class="propinst-background">'background'</span></a></th></tr>
+      <!-- TESTS 14.2.1 <colors.html#background-properties> -->
+    </tbody>
+    <tbody id="s14.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/colors.html#gamma-correction">14.3 Gamma correction</a></th></tr>
+      <!-- TESTS 14.3 <colors.html#gamma-correction> -->
+    </tbody>
+    <tbody id="s15" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html">15 Fonts</a></th></tr>
+      <!-- TESTS 15 <fonts.html> -->
+    </tbody>
+    <tbody id="s15.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#q1">15.1 Introduction</a></th></tr>
+      <!-- TESTS 15.1 <fonts.html#q1> -->
+    </tbody>
+    <tbody id="s15.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#algorithm">15.2 Font matching algorithm</a></th></tr>
+      <!-- TESTS 15.2 <fonts.html#algorithm> -->
+    </tbody>
+    <tbody id="s15.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#font-family-prop">15.3 Font family: the <span class="propinst-font-family">'font-family'</span> property</a></th></tr>
+      <!-- TESTS 15.3 <fonts.html#font-family-prop> -->
+    </tbody>
+    <tbody id="s15.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#generic-font-families">15.3.1 Generic font families</a></th></tr>
+      <!-- TESTS 15.3.1 <fonts.html#generic-font-families> -->
+    </tbody>
+    <tbody id="s15.3.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#serif-def">15.3.1.1 <span class="index-def" title="serif, definition of"><dfn>serif</dfn></span></a></th></tr>
+      <!-- TESTS 15.3.1.1 <fonts.html#serif-def> -->
+    </tbody>
+    <tbody id="s15.3.1.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#sans-serif-def">15.3.1.2 <span class="index-def" title="sans-serif, definition of"> <dfn>sans-serif</dfn></span></a></th></tr>
+      <!-- TESTS 15.3.1.2 <fonts.html#sans-serif-def> -->
+    </tbody>
+    <tbody id="s15.3.1.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#cursive-def">15.3.1.3 <span class="index-def" title="cursive, definition of"> <dfn>cursive</dfn></span></a></th></tr>
+      <!-- TESTS 15.3.1.3 <fonts.html#cursive-def> -->
+    </tbody>
+    <tbody id="s15.3.1.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#fantasy-def">15.3.1.4 <span class="index-def" title="fantasy, definition of"> <dfn>fantasy</dfn></span></a></th></tr>
+      <!-- TESTS 15.3.1.4 <fonts.html#fantasy-def> -->
+    </tbody>
+    <tbody id="s15.3.1.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#monospace-def">15.3.1.5 <span class="index-def" title="monospace, definition of"> <dfn>monospace</dfn></span></a></th></tr>
+      <!-- TESTS 15.3.1.5 <fonts.html#monospace-def> -->
+    </tbody>
+    <tbody id="s15.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#font-styling">15.4 Font styling: the <span class="propinst-font-style">'font-style'</span> property</a></th></tr>
+      <!-- TESTS 15.4 <fonts.html#font-styling> -->
+    </tbody>
+    <tbody id="s15.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#small-caps">15.5 Small-caps: the <span class="propinst-font-variant">'font-variant'</span> property</a></th></tr>
+      <!-- TESTS 15.5 <fonts.html#small-caps> -->
+    </tbody>
+    <tbody id="s15.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness">15.6 Font boldness: the <span class="propinst-font-weight">'font-weight'</span> property</a></th></tr>
+      <!-- TESTS 15.6 <fonts.html#font-boldness> -->
+    </tbody>
+    <tbody id="s15.7">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#font-size-props">15.7 Font size: the <span class="propinst-font-size">'font-size'</span> property</a></th></tr>
+      <!-- TESTS 15.7 <fonts.html#font-size-props> -->
+    </tbody>
+    <tbody id="s15.8">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/fonts.html#font-shorthand">15.8 Shorthand font property: the <span class="propinst-font">'font'</span> property</a></th></tr>
+      <!-- TESTS 15.8 <fonts.html#font-shorthand> -->
+    </tbody>
+    <tbody id="s16" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html">16 Text</a></th></tr>
+      <!-- TESTS 16 <text.html> -->
+    </tbody>
+    <tbody id="s16.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#indentation-prop">16.1 Indentation: the <span class="propinst-text-indent">'text-indent'</span> property</a></th></tr>
+      <!-- TESTS 16.1 <text.html#indentation-prop> -->
+    </tbody>
+    <tbody id="s16.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#alignment-prop">16.2 Alignment: the <span class="propinst-text-align">'text-align'</span> property</a></th></tr>
+      <!-- TESTS 16.2 <text.html#alignment-prop> -->
+    </tbody>
+    <tbody id="s16.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#q3">16.3 Decoration</a></th></tr>
+      <!-- TESTS 16.3 <text.html#q3> -->
+    </tbody>
+    <tbody id="s16.3.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#lining-striking-props">16.3.1 Underlining, overlining, striking, and blinking: the <span class="propinst-text-decoration">'text-decoration'</span> property</a></th></tr>
+      <!-- TESTS 16.3.1 <text.html#lining-striking-props> -->
+    </tbody>
+    <tbody id="s16.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#spacing-props">16.4 Letter and word spacing: the <span class="propinst-letter-spacing">'letter-spacing'</span> and <span class="propinst-word-spacing">'word-spacing'</span> properties</a></th></tr>
+      <!-- TESTS 16.4 <text.html#spacing-props> -->
+    </tbody>
+    <tbody id="s16.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#caps-prop">16.5 Capitalization: the <span class="propinst-text-transform">'text-transform'</span> property</a></th></tr>
+      <!-- TESTS 16.5 <text.html#caps-prop> -->
+    </tbody>
+    <tbody id="s16.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#white-space-prop">16.6 Whitespace: the <span class="propinst-white-space">'white-space'</span> property</a></th></tr>
+      <!-- TESTS 16.6 <text.html#white-space-prop> -->
+    </tbody>
+    <tbody id="s16.6.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#q8">16.6.1 The 'white-space' processing model</a></th></tr>
+      <!-- TESTS 16.6.1 <text.html#q8> -->
+    </tbody>
+    <tbody id="s16.6.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#q9">16.6.2 Example of bidirectionality with white-space collapsing</a></th></tr>
+      <!-- TESTS 16.6.2 <text.html#q9> -->
+    </tbody>
+    <tbody id="s16.6.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/text.html#q10">16.6.3 Control and combining characters' details</a></th></tr>
+      <!-- TESTS 16.6.3 <text.html#q10> -->
+    </tbody>
+    <tbody id="s17" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html">17 Tables</a></th></tr>
+      <!-- TESTS 17 <tables.html> -->
+    </tbody>
+    <tbody id="s17.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q1">17.1 Introduction to tables</a></th></tr>
+      <!-- TESTS 17.1 <tables.html#q1> -->
+    </tbody>
+    <tbody id="s17.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q2">17.2 The CSS table model</a></th></tr>
+      <!-- TESTS 17.2 <tables.html#q2> -->
+    </tbody>
+    <tbody id="s17.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes">17.2.1 Anonymous table objects</a></th></tr>
+      <!-- TESTS 17.2.1 <tables.html#anonymous-boxes> -->
+    </tbody>
+    <tbody id="s17.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q4">17.3 Columns</a></th></tr>
+      <!-- TESTS 17.3 <tables.html#q4> -->
+    </tbody>
+    <tbody id="s17.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q5">17.4 Tables in the visual formatting model</a></th></tr>
+      <!-- TESTS 17.4 <tables.html#q5> -->
+    </tbody>
+    <tbody id="s17.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q6">17.4.1 Caption position and alignment</a></th></tr>
+      <!-- TESTS 17.4.1 <tables.html#q6> -->
+    </tbody>
+    <tbody id="s17.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q7">17.5 Visual layout of table contents</a></th></tr>
+      <!-- TESTS 17.5 <tables.html#q7> -->
+    </tbody>
+    <tbody id="s17.5.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#table-layers">17.5.1 Table layers and transparency</a></th></tr>
+      <!-- TESTS 17.5.1 <tables.html#table-layers> -->
+    </tbody>
+    <tbody id="s17.5.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#width-layout">17.5.2 Table width algorithms: the <span class="propinst-table-layout">'table-layout'</span> property</a></th></tr>
+      <!-- TESTS 17.5.2 <tables.html#width-layout> -->
+    </tbody>
+    <tbody id="s17.5.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout">17.5.2.1 Fixed table layout</a></th></tr>
+      <!-- TESTS 17.5.2.1 <tables.html#fixed-table-layout> -->
+    </tbody>
+    <tbody id="s17.5.2.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">17.5.2.2 Automatic table layout</a></th></tr>
+      <!-- TESTS 17.5.2.2 <tables.html#auto-table-layout> -->
+    </tbody>
+    <tbody id="s17.5.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#height-layout">17.5.3 Table height algorithms</a></th></tr>
+      <!-- TESTS 17.5.3 <tables.html#height-layout> -->
+    </tbody>
+    <tbody id="s17.5.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#column-alignment">17.5.4 Horizontal alignment in a column</a></th></tr>
+      <!-- TESTS 17.5.4 <tables.html#column-alignment> -->
+    </tbody>
+    <tbody id="s17.5.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#dynamic-effects">17.5.5 Dynamic row and column effects</a></th></tr>
+      <!-- TESTS 17.5.5 <tables.html#dynamic-effects> -->
+    </tbody>
+    <tbody id="s17.6">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#borders">17.6 Borders</a></th></tr>
+      <!-- TESTS 17.6 <tables.html#borders> -->
+    </tbody>
+    <tbody id="s17.6.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#separated-borders">17.6.1 The separated borders model</a></th></tr>
+      <!-- TESTS 17.6.1 <tables.html#separated-borders> -->
+    </tbody>
+    <tbody id="s17.6.1.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#empty-cells">17.6.1.1 Borders and Backgrounds around empty cells: the <span class="propinst-empty-cells">'empty-cells'</span> property</a></th></tr>
+      <!-- TESTS 17.6.1.1 <tables.html#empty-cells> -->
+    </tbody>
+    <tbody id="s17.6.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#collapsing-borders">17.6.2 The collapsing border model</a></th></tr>
+      <!-- TESTS 17.6.2 <tables.html#collapsing-borders> -->
+    </tbody>
+    <tbody id="s17.6.2.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution">17.6.2.1 Border conflict resolution</a></th></tr>
+      <!-- TESTS 17.6.2.1 <tables.html#border-conflict-resolution> -->
+    </tbody>
+    <tbody id="s17.6.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/tables.html#q20">17.6.3 Border styles</a></th></tr>
+      <!-- TESTS 17.6.3 <tables.html#q20> -->
+    </tbody>
+    <tbody id="s18" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html">18 User interface</a></th></tr>
+      <!-- TESTS 18 <ui.html> -->
+    </tbody>
+    <tbody id="s18.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html#cursor-props">18.1 Cursors: the <span class="propinst-cursor">'cursor'</span> property</a></th></tr>
+      <!-- TESTS 18.1 <ui.html#cursor-props> -->
+    </tbody>
+    <tbody id="s18.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html#system-colors">18.2 System Colors</a></th></tr>
+      <!-- TESTS 18.2 <ui.html#system-colors> -->
+    </tbody>
+    <tbody id="s18.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html#system-fonts">18.3 User preferences for fonts</a></th></tr>
+      <!-- TESTS 18.3 <ui.html#system-fonts> -->
+    </tbody>
+    <tbody id="s18.4">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines">18.4 Dynamic outlines: the <span class="index-def" title="outline">'outline'</span> property</a></th></tr>
+      <!-- TESTS 18.4 <ui.html#dynamic-outlines> -->
+    </tbody>
+    <tbody id="s18.4.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html#q5">18.4.1 Outlines and the focus</a></th></tr>
+      <!-- TESTS 18.4.1 <ui.html#q5> -->
+    </tbody>
+    <tbody id="s18.5">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/ui.html#q6">18.5 Magnification</a></th></tr>
+      <!-- TESTS 18.5 <ui.html#q6> -->
+    </tbody>
+    <tbody id="sA" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/aural.html">Appendix A. Aural style sheets</a></th></tr>
+      <tr><td><em>Informative</em></td></tr>
+    </tbody>
+    <tbody id="sB" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/refs.html">Appendix B. Bibliography</a></th></tr>
+      <!-- TESTS B <refs.html> -->
+    </tbody>
+    <tbody id="sC" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/changes.html">Appendix C. Changes</a></th></tr>
+      <tr><td><em>Informative</em></td></tr>
+    </tbody>
+    <tbody id="sD" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/sample.html">Appendix D. Default style sheet for HTML 4</a></th></tr>
+      <tr><td><em>Informative</em></td></tr>
+    </tbody>
+    <tbody id="sE" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/zindex.html">Appendix E. Elaborate description of Stacking Contexts</a></th></tr>
+      <!-- TESTS E <zindex.html> -->
+    </tbody>
+    <tbody id="sE.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/zindex.html#q1">E.1 Definitions</a></th></tr>
+      <!-- TESTS E.1 <zindex.html#q1> -->
+    </tbody>
+    <tbody id="sE.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/zindex.html#q2">E.2 Painting order</a></th></tr>
+      <!-- TESTS E.2 <zindex.html#q2> -->
+    </tbody>
+    <tbody id="sE.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/zindex.html#q3">E.3 Notes</a></th></tr>
+      <!-- TESTS E.3 <zindex.html#q3> -->
+    </tbody>
+    <tbody>
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/propidx.html">Appendix F. Full property table</a></th></tr>
+      <tr><td><em>Informative</em></td></tr>
+    </tbody>
+    <tbody id="sG" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/grammar.html">Appendix G. Grammar of CSS&nbsp;2.1</a></th></tr>
+      <!-- TESTS G <grammar.html> -->
+    </tbody>
+    <tbody id="sG.1">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/grammar.html#q1">G.1 Grammar</a></th></tr>
+      <!-- TESTS G.1 <grammar.html#q1> -->
+    </tbody>
+    <tbody id="sG.2">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/grammar.html#q2">G.2 Lexical scanner</a></th></tr>
+      <!-- TESTS G.2 <grammar.html#q2> -->
+    </tbody>
+    <tbody id="sG.3">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/grammar.html#tokenizer-diffs">G.3 Comparison of tokenization in CSS&nbsp;2.1 and CSS1</a></th></tr>
+      <!-- TESTS G.3 <grammar.html#tokenizer-diffs> -->
+    </tbody>
+    <tbody id="sI" class="ch">
+      <tr><th colspan="3" scope="rowgroup"><a href="http://www.w3.org/TR/CSS21/indexlist.html">Appendix I. Index</a></th></tr>
+      <tr><td><em>Informative</em></td></tr>
+    </tbody>
+  </table>
+
+ </body>
+</html>

File cvs-import/CSS2.1-test-suite/lib/html.pm

     if ($node->{tagName} eq '{http://www.w3.org/1999/xhtml}img' or
         $node->{tagName} eq '{http://www.w3.org/1999/xhtml}br' or
         $node->{tagName} eq '{http://www.w3.org/1999/xhtml}link' or
+        $node->{tagName} eq '{http://www.w3.org/1999/xhtml}col' or
         $node->{tagName} eq '{http://www.w3.org/1999/xhtml}input') { # XXX any others?
         $output .= startTagAsHTML($node);
         if (@{$node->{childNodes}}) {

File cvs-import/CSS2.1-test-suite/lib/indexer.pm

+# This module written by fantasai
+package indexer;
+use strict;
+use utf8;
+
+# Usage:
+# init('Spec Root URL', 'path/to/template.xht', 'Test Suite Title: ')
+# foreach test {
+#   index('path/to/test.xht','testid')
+# save('path/to/save/index.xht')
+
+# 'Spec Root URL' is e.g. 'http://www.w3.org/TR/CSS21/'
+# The template must have lines of the form <!-- TESTS 3.2 <third.html#sec2> -->
+# where third.html#sec2 matches the rel="help" links
+
+
+my %types = ( 'a' => 'atomic',
+              'b' => 'basic',
+              'c' => 'composite',
+              'd' => 'detailed',
+              'e' => 'evil',
+              'f' => 'failure' );
+
+my %flags = (  'a' => '<abbr title="Requires Ahem Font">A</abbr>',
+              'f' => '<abbr title="Requires HTML Framese Support">F</abbr>',
+              'g' => '<abbr title="Requires Bitmap Graphics Support">G</abbr>',
+              'h' => '<abbr title="Requires Session History">H</abbr>',
+              'i' => '<abbr title="Requires User Interaction">I</abbr>',
+              'm' => '<abbr title="Requires MathML Support">M</abbr>',
+              'n' => '<abbr title="Requires XML Namespaces Support">N</abbr>',
+              'o' => '<abbr title="Requires DOM (Document Object Model) Support">O</abbr>',
+              'v' => '<abbr title="Requires SVG Support">V</abbr>' );
+
+my %testdata = ();
+my %linkindex = ();
+
+my $specroot = '';
+my $template = '';
+my $titlestr = '';
+
+sub init {
+  $specroot = shift @_;
+  $template = shift @_;
+  $titlestr = shift @_;
+}
+
+sub index {
+  my $file = shift @_;
+  my $id = shift @_;
+
+  if ($id =~ m/^t(\d\d)(\d\d)?(\d\d)?-[a-z0-9\-]+-([a-f])(?:-([a-z]+))?$/) {
+
+    # Collect Metadata
+    local $_ = $1;
+    $_ .= '.'.$2 if $2;
+    $_ .= '.'.$3 if $3;
+    my %data = ( 'primary' => $_,
+                 'type'    => $4,
+                 'flags'   => $5 || '' );
+    $data{'primary'} =~ s/0(\d)/$1/g;
+
+    my @links = getHeadData($file, $id);
+    $data{'title'} = shift @links;
+    $data{'links'} = \@links;
+
+    # Build Test Database
+    $testdata{$id} = \%data;
+
+    # Build Section-based Index
+    foreach (@links) {
+      $linkindex{$_} = [] if (!defined $linkindex{$_});
+      push(@{$linkindex{$_}}, $id);
+    }
+
+  }
+  else {
+    print "!! Filename fails format test: $id\n";
+  }
+
+}
+
+sub getHeadData {
+  # Get contents
+  my $file = shift @_;
+  my $id = shift @_;
+  local $/ = undef;
+  open FILE, $file || die "couldn't open file $file: $!";
+  my $contents = <FILE>;
+  close FILE;
+
+  my @links = ();
+  my $title = $id;
+  if ($contents =~ /<head.*?>(.*)<\/head\s*>/sm) {
+    local $_ = $1;
+
+    # Get title
+    /<title.*?>(.*)<\/title\s*>/sm;
+    $title = $1;
+    $title =~ s/$titlestr//;
+
+    # Collect rel="help" URLs
+    @links = /<link\s.*?rel="\s*help\s*".*?>/g;
+    foreach (@links) {
+      /href="$specroot(.+?)"/;
+      $_ = $1;
+    }
+  }
+  return ($title, @links);
+}
+
+
+sub save {
+  my $output = shift @_;
+
+  open TMPL, $template or die "index::sections could not open template $template: $!";
+  open OUT, ">$output" or die "index::sections could not open output file $output: $!";
+
+  while (<TMPL>) {
+    if (/(\s*)<!-- TESTS ([A-Z\d\.]+) <(.+)> -->/) {
+      my ($indent, $primary, $section) = ($1, $2, $3);
+
+      next if (!defined $linkindex{$section}); # no tests for this section
+      foreach my $test (@{$linkindex{$section}}) {
+        my %data = %{$testdata{$test}};
+
+        # highlight and ID test if this is its primary section
+        my ($hlstart, $hlend, $idstr) = ('', '', '');
+        if ($data{'primary'} eq $primary) {
+          $hlstart = '<strong>';
+          $hlend = '</strong>';
+          $idstr = qq' id="$test"';
+        }
+
+        # Print test info table row
+        print OUT "$indent<tr$idstr>\n";
+        print OUT "$indent  <td>$hlstart<a href=\"$test.xht\">$data{'title'}</a>$hlend</td>\n";
+        print OUT "$indent  <td>$types{$data{'type'}}</td>\n";
+        print OUT "$indent  <td>";
+        foreach my $flag (sort keys %flags) {
+          print OUT $flags{$flag}." " if ($data{'flags'} =~ /$flag/);
+        }
+        print OUT "</td>\n";
+        print OUT "$indent</tr>\n";
+      }
+    }
+    else { # no replacement necessary
+      print OUT;
+    }
+  }
+  close TMPL;
+  close OUT;
+}
+
+1;