I have two XML schemas. First ( A.xsd) is in the jar file of the library ( mylib.jar), and the second ( B.xsd) is in my project.
I want to import A.xsdinto B.xsdand validate incoming XML through the built-in validator Jaxb2Marshaller.
However, I cannot get it to work correctly: it seems that the internal XML validator Jaxb2Marshallerdoes not understand file references in jar files (I just want to write something like that <xs:import namespace="http://my/schema.xsd" schemaLocation="classpath:schema.xsd">).
How can this be fixed? How can I attach a library schema to a project schema?
source
share