View Single Post
Old 01-11-2011, 10:42 AM   #13
Wolfgan
Avid reader
Wolfgan began at the beginning.
 
Wolfgan's Avatar
 
Posts: 19
Karma: 10
Join Date: Feb 2009
Location: Argentina
Device: Kindle 3 wifi
Double chapter detection

In converting a lit to mobi for my kindle3, the standard chapter detection XPath expression didn't detect anything (the source file is rather flat on that sense).

As the source file chapters seem to be just a # symbol starting a paragraph (ie #And then the beast run thru the forest... ), I created the following XPath expression:

Code:
//*[re:test(., '(?s)^#\w+','i')]
It works well on the detection side, what's puzzling me is that it detects the chapters twice, one after the other (as if the parser run twice).
Any clue? Thanks in advance, Wolf.
Wolfgan is offline   Reply With Quote