What you can do, is just create an internal TOC with the headers. You can hide the headers by using for example:
Code:
<h2 title="chapter1" class="hidden">
And then in the stylesheet
Code:
h2.hidden {
font-size: 1%;
margin: 0;
visibility: hidden;}
With this you can generate a TOC without it being visible.