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...