|
|
Thread Tools | Search this Thread |
12-10-2014, 10:27 AM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Dec 2014
Device: none
|
Help with XPath picking up two classes for chapter and chapter name?
My html code has two "class=" tags. One called "chapter" and one called "chaptername"
In a previous ebook I converted - I was able to successfully use Code:
//h:p[re:test(@class, "chapter", "i")] I want Calibre to list the chapters in the TOC like: Chapter 1 - Blah Blah Name of Chapter Chapter 2 - Blah blah another name I tried just adding the second "chaptername" tag after the first like this: Code:
//h:p[re:test(@class, "chapter","chaptername", "i")] Sorry if I'm not explaining this correctly! Can anyone help??? Thanks! |
12-10-2014, 10:52 AM | #2 |
Member
Posts: 23
Karma: 10
Join Date: Apr 2014
Location: Paris
Device: ipad 2, Ubuntu
|
Hello Gretchen,
Try Code:
//h:p[re:test(@class, "chapter(name)?", "i")] Code:
//h:p[re:test(@class, "chapter|chaptername", "i")] Denis Last edited by dmonasse; 12-10-2014 at 10:56 AM. |
Advert | |
|
Tags |
calibre, conversion, formatting, xpath |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
xpath to insert chapter breaks - but chapter name cut off ? | Rob557 | Conversion | 2 | 03-06-2014 07:59 AM |
xpath exp for just roman unumerals as Chapter headings | p3aul | Conversion | 8 | 04-08-2012 05:30 PM |
Ebook chapter titles: with or without chapter number? | amoroso | Writers' Corner | 16 | 06-14-2011 07:35 AM |
Xpath expression for detecting chapter marks | p3aul | Calibre | 5 | 11-15-2010 12:14 AM |
xpath for chapter detection | romnempire | Calibre | 7 | 07-26-2010 06:34 PM |