View Single Post
Old 10-20-2010, 09:34 PM   #2
TargonD
Junior Member
TargonD began at the beginning.
 
Posts: 2
Karma: 12
Join Date: Oct 2010
Device: nook
Found answer

OK after some work and using information that I found on another post. not sure which one, but with a little modification I ended up with this for the Detect chapters.

//*[((name()='p') and re:test(., 'CHAPTER', ""))]

The books I have been converting to epub were in RTF format so I made all of the chapter headers capital. I removed the 'i' so that it would be case sensitive. Then I used the level 1 TOC wizard to get.

//h:h1[re:test(@class, "chapter", "i")]

Not sure why this works, but I have done three books and all had a correct TOC with no extras.

I don't know if anyone is interested - but with all of the information that I have found on this site, I wanted to give a little back. I hope this helps some.
TargonD is offline   Reply With Quote