View Single Post
Old 09-30-2011, 02:29 PM   #2
therealjoeblow
Zealot
therealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfolded
 
Posts: 106
Karma: 52102
Join Date: Jun 2010
Device: Samsung Android Tablet w/Moon+ Pro Reader
Quote:
Originally Posted by ccraig13 View Post
I've done this before ( About a month ago ) but ever since I upgraded Calibre ( A few days ago ) it doesn't work anymore. My chapters are coded as follows:
Code:
<p class="a-chap-title">
  <a class="calibre4" href="../Text/BOS_split_000.xhtml#toc" id="chaptertitle">
    Chapter Title
  </a>
</p>
I set the regex to look for p tags with a class value of "a-chap-title":
Code:
//h:p[re:test(@class, "a-chap-title", "i")]
I get nothin.
I'm no expert, but your <p> doesn't contain any text in it, it contains the anchor which contains the text.

Try using the anchor as the trigger instead:
Code:
//h:a[re:test(@class, "calibre4", "i")]
See if that works
The REAL Joe
therealjoeblow is offline   Reply With Quote