XmlFile (final XmlTag parentTag) { XmlAttribute attribute = parentTag.getAttribute(XmlUtil.SCHEMA_LOCATION_ATT); if (attribute != null) { XmlAttributeValue element = attribute.getValueElement(); PsiElement psiElement = new URLReference(element).resolve(); if (psiElement instanceof XmlFile) { return ((XmlFile)psiElement); } } return null; }