View Single Post
Old 02-12-2015, 04:50 PM   #10
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Thanks @BetterRed!

I found a solution that works for me!

First I create the ToC based on XPath.

Level 1 is //h:h1
Level 2 is //h:address[@class="author"]

This will give me a toc.ncx which I open in the editor.

On that I apply this Search:

Code:
(<text>)(.*?</text>\s*</navLabel>\s*<content src=".*?)#.*?("/>)\s*<navPoint.*?>\s*<navLabel>\s*<text>(.*?)</text>\s*</navLabel>\s*<conten.*?/>\s*</navPoint>
And apply this replace:

Code:
\1\4: \2\3
After that I create the Inline ToC.
Skeeve is offline   Reply With Quote