@Nullable
  @InspectionMessage
  private String doValidateWithData() {
    String rootElementName = getElementName();
    if (rootElementName == null || rootElementName.isEmpty()) {
      return XmlBundle.message("schema2.instance.no.valid.root.element.name.validation.error");
    }

    final PsiFile psiFile = findFile(getUrl().getText());
    if (psiFile instanceof XmlFile) {
      final XmlTag tag = getRootTag(psiFile);
      if (tag != null) {
        final XmlElementDescriptor descriptor = Xsd2InstanceUtils.getDescriptor(tag, rootElementName);

        if (descriptor == null) {
          return XmlBundle.message("schema2.instance.no.valid.root.element.name.validation.error");
        }
      }
    }

    final String fileName = getOutputFileName();
    if (fileName == null || fileName.isEmpty()) {
      return XmlBundle.message("schema2.instance.output.file.name.is.empty.validation.problem");
    }
    return null;

  }
@Nullable
  @InspectionMessage
  private String doValidateWithData()