Try giving this xpath a shot:
Code:
//*[((name()='span' or name()='h2') and re:test(., 'chapter|book|section|part\s+', 'i') and (@class = 'bold')) ]
If that doesn't work, the alternate approach is a bit convoluted. Convert from azw to epub using the following steps:
1. Enable the preprocess option under structure detection
2. Under epub output, change 'split files larger than' to 3048 (or larger if you book is really big)
3. Convert
4. rename the resulting epub from 'bookname.epub' to 'bookname.zip'
5. Edit the book metadata, formats etc in the edit book window
6. Add the bookname.zip file as a new format type
7. Now convert from zip to mobi, enable preprocess under structure detection - with the types of chapters you have the TOC should be automatically created.