MyCoRe-Org / libmeta

Java APIs and models for common library standards
GNU Lesser General Public License v3.0
0 stars 2 forks source link

XMLSchemaValidator does not read all catalog.xml files #97

Open rsteph-de opened 2 months ago

rsteph-de commented 2 months ago

When reading the libmeta catalog.xml files for XML schema validation we need ALL classpath resources for the given path and not only the first one.

getClassLoader.getResources() returns an Enumeration of URLs for all occurrences.

XMLSchemaValidator.class.getClassLoader().getResources("/libmeta/catalog.xml").;
XMLSchemaValidator.class.getClassLoader().getResources("/libmeta/catalog.additional.xml"))

to get a stream use Collections.list(enumeration).stream()