Okay, I have tracked down how this case got through lxml without it cleaning up the namespaces.
The problem is the cleaning routine ignored properly well-formed xml (and your content.opf was actually well formed but using strange namespace prefixes) and so passed it through untouched and its strange namespace usage never got properly cleaned up.
I will modify the xmlprocessor.py code to even clean up namespaces in xml files that are opf's to prevent this problem from occurring again.
I will push this fix to master tomorrow after some more testing and it will appear in the very next release.
Thank you for your bug report!
KevinH
|