Here's another plugin that you might like to try out. This plugin does the following:
- Gathers all the toc item heading strings from the epub TOC page and puts them into a list.
- Finds all headings and subheadings in the epub html using the TOC item heading list.
- Adds an associate toc item heading value(from the TOC page) to a new title attribute per heading or per sub-heading found, which will always be in title case. You were not very clear whether you just wanted only main chapter headings tagged with the title attribute or all chapter headings and sub-headings tagged. So I went with all chapter headings and sub-headings tagged with the title attribute.
- The new plugin no longer changes any chapter heading tags or part heading tags in the epub -- it leaves them alone.
- The new plugin automatically iterates over all the files in your epub - so there's no need to select any files before running the new plugin.
- For the plugin to work without problems you must also make sure that the TOC page in the epub has either "Table of Contents" or "Contents" as the TOC page heading.
This will also be my last attempt at trying to create your plugin. See below for the new plugin.
[Plugin has been removed] .