View Single Post
Old 07-11-2010, 10:28 AM   #1
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Xpath TOC Expression

I have an html source file in which I use the <span class="chno"> tags to generate level 2 TOC entries. In calibre's conversion I set:

[Table of Contents] > [Level 2 TOC] > //h:span[re:test(@class, "chno", "i")]

I now want to extend this to use both <span class="chno"> tags and <h3 class="toc2"> tags to generate my level 2 TOC.

What should I use for the XPath expression to achieve this?
Agama is offline   Reply With Quote