@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
|