I think the only way you could pul this off would be a
cooperative effort with the programmers. If you look at an Index
file (HHK), you'll see this code block for each Index entry:
<li><object type="text/sitemap">
<param name="Name" value="Index Entry">
<param name="Name" value="Topic Title">
<param name="Local" value="Topic_FileName.htm">
</object>
They might come up with maybe a Perl script that would scoop
up everything tagged with H1 & H2, and populate the appropriate
locations in the format as shown above (to which, of course, you
would add the front and back matter to create the proper HHK
format).
Any work with sub-entries, I'm afraid, would probably have to
be manually done.
Good luck,
Leon