View Single Post
Old 10-26-2011, 09:08 PM   #1
hymie
Enthusiast
hymie began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
class="none" vs class="none1"

Greetings.

I am trying to use Calibre to convert an e-book with lousy chapter marks.

A chapter is marked with
<span class="none">

However, there are other parts of the book (italic text) which are marked with
<span class="none1">

I'm trying to get an XPath that recognizes the difference.

//h:span[re:test(@class, "none", "i")] matches both sets
//h:span[re:test(@class, "none\b", "i")] matches both sets
//h:span[re:test(@class, "none$", "i")] matches nothing
//h:span[re:test(@class, '"none"', "i")] matches nothing

//h:span[re:test(@class, "["]none["]", "i")] is an invalid XPath
//*[@class="none"] matched nothing
//h:span[@class="none"] matched nothing

How can I properly find my chapters?

Thanks.

--hymie!
hymie is offline   Reply With Quote