View Single Post
Old 11-02-2010, 10:45 AM   #7
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
I suspect that lines are passed one by one to the TOC creating code? That would explain the behaviour. Note also the trailing $ at the end of the *matching* regexp that I mentioned in my first post...

I am not sure I understand your magic wand source question - I thought the magic wand is just meant to specify the XPath in a semi-automatic way? Anyway, in case you are asking about the complete XPath I used, then it was this (only trying to catch the first part of chapter name to simplify things):
Code:
//*[re:test(., "^[0-9]+\.\s+[a-zA-Z]+")]
I am going to have a look at the XHTML intermediate, perhaps that will tell me something more...

Last edited by janvanmaar; 11-02-2010 at 10:47 AM.
janvanmaar is offline   Reply With Quote