Originally Posted by DNSB
It sounds rather as if Calibre is using namespaces without defining them. You might want to look at the xmlns declaration at the start of the (x)html files within an epub as an example of a namespace definition. If you are going to use template:whatever for instance, you need to have a namespace definition for template.
Perhaps you might want to blame Calibre rather than Kobo for your issue.
Calibre might be causing errors, but Kobo still should crash ungracefully no matter what it finds. It;s OK for it not accept the malformed file, but to crash and burn with no clue is BAD programming. Especially as I have been reading complaints about it for a very long time, and many many versions of the software - and they still have never fixed it.