| The problem is that beans_1_1.xsd and beans_2_0.xsd share the same namespace and so we get:
java.lang.IllegalArgumentException: When using an array of Objects as the value of the 'http://java.sun.com/xml/jaxp/properties/schemaSource' property, it is illegal to have two schemas that share the same target namespace.
|
We would have to parse the xml twice. First to detect the version and then validate (with the correct XSD) and construct BeansXml object. |