[PATCH v2 4/6] xmllite/writer: Improve error handling when writing namespace defitions.