Under some circumstances xmlbeans will 'forget' to create a namespace needed for the 'xsi:type'
attribute. This happens after an XmlObject is created by XmlObject.parse(XmlStreamReader).
This behaviour causes a NullpointerException in the Validation (amongst other unfortunate things).
This can be triggered by a save-load circle.
I will attach a schema and a JUnitTest to reproduce this issue.