assert psiFile != null;
PsiFile f = psiFile.getOriginalFile();
if (f == psiFile || f.getVirtualFile() == null) f = myDocument.getContainingFile();
final PsiFile file = ResolveUtil.resolveFile(href, f);
if (file instanceof XmlFile) {
<BUG>final List<PsiElement> data = myDocument.getContainingFile().getUserData(ResolveUtil.DEPENDENCIES);
if (data == null) {
myDocument.getContainingFile().putUserData(ResolveUtil.DEPENDENCIES, new SmartList<PsiElement>(file));
} else if (!data.contains(file)) {
data.add(file);
}</BUG>
return Result.create(changeDocument(((XmlFile)file).getDocument()));

assert psiFile != null;
PsiFile f = psiFile.getOriginalFile();
if (f == psiFile || f.getVirtualFile() == null) f = myDocument.getContainingFile();
final PsiFile file = ResolveUtil.resolveFile(href, f);
if (file instanceof XmlFile) {
return Result.create(changeDocument(((XmlFile)file).getDocument()));
