11-14-2010, 11:05 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2010
Device: HTC
|
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. |
11-14-2010, 11:24 PM | #2 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
If your original re:test version worked, all you need do is add another re:test after an or:
Code:
//h:span[re:test(@class, "section-title-2", "i") or re:test(@class, "section-title-3", "i")] Code:
//*[@class = 'chapter-title'] //*[@class = 'chapter-title-1'] //*[@class = 'chapter-title-2' or @class = 'chapter-title-3'] |
Advert | |
|
11-14-2010, 11:34 PM | #3 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2010
Device: HTC
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents | peterinnes | Sigil | 1 | 09-29-2010 03:03 AM |
Help with my Table of Contents | Skylinefranc | Calibre | 0 | 03-19-2010 12:55 AM |
How to: table of contents | wizzofoz | Sigil | 1 | 10-08-2009 08:22 AM |
only the table of contents | wang960 | Sony Reader | 3 | 08-29-2008 12:45 PM |
Creator Table of Contents | Nate the great | Kindle Formats | 5 | 07-10-2008 05:55 AM |