View Single Post
Old 12-10-2014, 09:27 AM   #1
~Gretchen~
Junior Member
~Gretchen~ began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2014
Device: none
Question 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")]
But that only picks up whatever is under the one class=chapter tag. I'm unfamiliar with XPath and I want to have both chapter and chaptername on Level one.

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")]
But it still only picked up what was under the chapter tag.

Sorry if I'm not explaining this correctly! Can anyone help??? Thanks!
~Gretchen~ is offline   Reply With Quote