log("Matching catalog entry found for uri: \'" + matchingEntry.getPublicId() + "\' location: \'" + matchingEntry.getLocation() + "\'", Project.MSG_DEBUG);
//
// Use the passed in base in preference to the base
// from matchingEntry, which is either null or the
// directory in which the external catalog file from
// which it was obtained is located. We make a copy
// so matchingEntry's original base is untouched. Of
// course, if there is no base, no need to make a
// copy...
// so matchingEntry's original base is untouched.
//
// This is the standard behavior as per my reading of
// the JAXP and XML Catalog specs. CKS 11/7/2002
//
ResourceLocation entryCopy = matchingEntry;
if (base != null) {
try {
URL baseURL = new URL(base);
entryCopy = new ResourceLocation();
entryCopy.setBase(baseURL);
}
catch (MalformedURLException
ex) {
// ignore
}
}
entryCopy.setPublicId(matchingEntry.getPublicId());
entryCopy.setLocation(matchingEntry.getLocation());
source = filesystemLookup(entryCopy);
if (source == null) {
source = classpathLookup(entryCopy);
}
|