@Nullable
 private PsiMetaOwner retrieveOwner(final XmlFile file, final String namespace) {
   if (file == null) {
     return namespace.equals(XmlUtil.getTargetSchemaNsFromTag(this)) ? this : null;
   }
   return file.getDocument();
 }
 @Nullable
 private static XmlNSDescriptor getDtdDescriptor(@NotNull XmlFile containingFile) {
   final XmlDocument document = containingFile.getDocument();
   if (document == null) {
     return null;
   }
   final String url = XmlUtil.getDtdUri(document);
   if (url == null) {
     return null;
   }
   return document.getDefaultNSDescriptor(url, true);
 }