I have two XML Schemas. First (A.xsd
) is located in a library jar file (mylib.jar
) and the second one (B.xsd
) is in my project.
I want to import A.xsd
into the B.xsd
and validate incoming XML via Jaxb2Marshaller
embedded validator.
However I'm unable to make it work properly: it seems that inner XML validator of Jaxb2Marshaller
does not understand references to files in jar-files (I just want to write something like <xs:import namespace="http://my/schema.xsd" schemaLocation="classpath:schema.xsd">
).
How it could be fixed? How could library schema be referenced from a project schema?