View Single Post
Old 06-21-2011, 10:10 AM   #133
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Idolse - I just downloaded your code and the problem is with your break statement. The xpgt function you copied from has an inner for loop to do with iterating through the xpgt file itself. Yours does not, hence you are breaking out of the for name in container.name_map loop.

EDIT: with regards to the xhtml files. I could be completely wrong here, but I would be reluctant to go down the xpath route, as surely that will mean re-writing the xhtml files using the xpath tostring() which means you are at the mercy of the content being reformatted, encoding issues etc?

Last edited by kiwidude; 06-21-2011 at 10:22 AM. Reason: Add comment about xpath for xhtml
kiwidude is offline   Reply With Quote