Thanks for the patch.
It's probably best to not allow the configurability of this, and simply not log a violation if the document is invalid (too many small configuration options will complicate the usage).
Clearly, there must be another rule, which will log a single violation per invalid document.
The XML plugin has been migrated to GitHub, https://github.com/SonarCommunity/sonar-xml
It would be nice if you could fork it, and make a pull request there, to change this behaviour.
Also please do not integrate other changes in your patch, such as adding a requirement on Sonar 3.3 or Java 6.
Only keep the part that relates to this ticket.
Eric will get back to you about the unit test not being run on the CI server.