Quote:
Originally Posted by Manichean
You used
Code:
//*[re:test(., "CHAPTER \d", "i")]
which tests for any occurence of the word "chapter" in upper- or lowercase followed by a single number and inside any tag. My XPath expression tests for an uppercase "CHAPTER" followed by one or more numbers inside a span tag, which itself is inside a p tag. Your expression, for whatever reasons, fits four incidences per chapter. Look at the source and figure it out. And look at the XPath tutorial I linked to earlier.
|
thanks for the extra explanation, but I still can't figure how i get exactly 4 in every chapter. FWIW all 4 toc entries jump to same chapter start.
let me post one sample chapter as zipped xhtml source & tell me what I'm missing here please. there are no strange files in the EPUB when I explode it, so my code is somehow deriving 4 instances from this source file