String absoluteURI = doc.getBaseURI() + ref.getURI();
Policy resolved = registry.lookup(absoluteURI);
if (null != resolved) {
return resolved;
}
ReferenceResolver resolver = new LocalDocumentReferenceResolver(doc, builder);
resolved = resolver.resolveReference(relativeURI);
if (null != resolved) {
ref.setURI(absoluteURI);
registry.register(absoluteURI, resolved);
}
return resolved;