View Single Post
Old 03-25-2016, 11:14 PM   #3
morgon
Junior Member
morgon began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2015
Device: none
I managed to work around it by having a look at the debug-logs.

It seems that calibre converts input-files into an intermediate xhtml-format to which the xpath-selectors refer.

In my case I found that all the chapter-headings from the input-rtf where rendered as h1-tags, so I changed the selector to:

Quote:
//h:h1[re:test(., "^\d+\. [ 'A-Z]+$")]
And this works now. All chapters detected, only one entry in the TOC.

Unfortunately I still don't understand why the chapters appear twice with the above selector....

Oh well...
morgon is offline   Reply With Quote