Your comments

I second that, the XML produced is not valid against standard validators, which makes integration with third-party difficult.

Ideally it should pass against the OPDS validator: https://opds-validator.appspot.com/