I have an XSD against which I have to validate XML documents in my application. The schema imports few namespaces in it, which are defined in other XSD documents.
I am using DocumentBuilderFactory to create validating parsers. Now, I can only provide a single schema as an input to the factory, as a result of which, some XMLs are not getting validated (as they contain elements defined in the imported namespaces).
How do I get around this problem? Do I need to perform some XSLT transformation and merge all the schemas together or is there a convenient way out?