Declaring the namespace should get the HTML to render OK. The following raises an exception during parsing:
<html xmlns:py="http://purl.org/kid/ns#" >
<element mochi:format="" />
</html>
To get it to render OK all I had to do was:
<html xmlns:py="http://purl.org/kid/ns#"
xmlns:mochi="some_unique_uri">
<element mochi:format="" />
</html>
....which will give as it's final output:
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:mochi="some_unique_uri">
<element mochi:format="" />
</html>
I hope this helps.
-- David

