catalogLocations.add(moduleRef);
}
}
if (catalogLocations.isEmpty()) {
// in XQTS-extra we don't catalog modules, we just reference them directly
StandardModuleURIResolver r = StandardModuleURIResolver.getInstance();
return r.resolve(moduleURI, baseURI, locations);
} else {
String[] locs = new String[catalogLocations.size()];
for (int i=0; i<locs.length; i++) {
locs[i] = (String)catalogLocations.get(i);
}
StandardModuleURIResolver r = StandardModuleURIResolver.getInstance();
return r.resolve(moduleURI, testCase.getBaseURI(), locs);
}
}