07-11-2010, 10:28 AM | #1 |
Guru
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? |
07-11-2010, 11:00 AM | #2 |
creator of calibre
Posts: 43,852
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
//h:span[re:test(@class, "chno", "i")]|//h:h3[re:test(@class, "toc2", "i")]
|
Advert | |
|
07-12-2010, 02:24 AM | #3 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Thanks, that does the job nicely.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help with XPath | NASCARaddicted | ePub | 13 | 02-20-2015 06:04 AM |
XPath Expression wizard?? | tonyx3 | Calibre | 1 | 01-26-2010 04:49 AM |
XPath question | krischik | Calibre | 0 | 01-16-2010 08:22 AM |
XPath Expression Wizard Error | Crusader | Calibre | 4 | 12-27-2009 12:09 PM |
XPath query | amjbrown | Calibre | 2 | 05-10-2009 06:04 PM |