I have a project where I generate lots of code against many XSD. To keep things separate each set of XSD are bundled together within a project. I have multiple project tha
If the XSDs all have the same name, you will need another criteria with knowledge of what the "right one" is. Can you embed some information in it (or with it, like a properties file or something) indicating its purpose?
And, a more convenient iterator to get them might be:
getClass().getClassLoader().getResources("/file.xsd");
or something. (Relies on the classpath, whether it is on the file system or in a jar)