View Single Post
Old 11-14-2010, 11:05 PM   #1
armjorge
Junior Member
armjorge began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2010
Device: HTC
Post 4 levels xpath table of contents

Hello everybody!! I'm trying to make a table of contents of a big medical book, a well build index is indispensable (Pathologic Basis of disease).
The book has a structure based on css classes and atributes:

<span class="chapter-title"> title of chapter </span>
<span class="section-title-1"> Title of section </span>
<span class="section-title-2"> Subtitle </span>
<span class="section-title-3"> Sub-subtitle </span>

And Calibre has the instructions:

//h:span[re:test(@class, "chapter-title", "i")]
//h:span[re:test(@class, "section-title-1", "i")]
//h:span[re:test(@class, "section-title-2", "i")]

Anybody could help me to add the instruction:
//h:span[re:test(@class, "section-title-3", "i")]

It'doesnt matter if section-title-2 are shown with section-title-3, the point is show both entries. So I tryed to add a double instruction, like this:

//h:span[re:test(@class, "section-title-1", "section-title-2", "i")]
and this:
//h:span[re:test(@class, "section-title-1" or "section-title-2", "i")]
and this:
//h:span[re:test(@class, "section-title-1", "i")(@class, "section-title-2", "i")]

But this fail.

¿can you help me?

Thanks a lot for your time.
armjorge is offline   Reply With Quote