I have used a modified version of the standard
Chapters and page breaks expression:
Code:
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|0|1|2|3|4|5|6|7|8|9\s+', 'i')) or @class = 'chapter']
This just keys on any number in an h1 or h2, and, as Stinger suggests, this may not be best for all ebooks. So I only use the above when the standard version fails. This probably isn't the cleanest way to test for digits, but it works.