@Mister L...I have some good reasons why I am so frustrated with your plugin requirements. These reasons are:
1. In your post above that contains your bullet-point spec you said that you wanted to transform or combine the headings of h1 and h2 in your xhtml files using the NCX TOC headings. So after 3 whole pages of telling me what you want in your plugin, you then -- on the 4th page -- mention for the first time ever in that spec that you want to combine h1 and h2 for certain headings only. That p*ssed me off because that single requirement means that I will have to redesign the plugin more or less from scratch again.
2. Your requirement that your xhtml headings
must to look exactly the same as NCX headings really surprises me. Why do you insist on that? In my ebooks my xhtml headings will look like this:
CHAPTER 1
The Tiger Steps Out
...but my NCX TOC headings will look like this:
Chapter 1 ~ The Tiger Steps Out
I don't change my xhtml headings.
Your apparent insistence on the xhtml headings being combined look exactly the same as the NCX headings makes more [unnecessary] work for me wrt the plugin. I honestly can't see any good reasons for that requirement since those two different heading formats that I use(shown above), which are very similar to your current epub headings, shouldn't cause any confusion whatsoever for any reader as far as I can see.