private void checkRefs(@NotNull XmlElement element, @NotNull ProblemsHolder holder, int startIndex) {
    PsiReference[] references = element.getReferences();
    if (references.length <= startIndex) {
      return;
    }

    if (XmlHighlightVisitor.isInjectedWithoutValidation(element)) {
      return;
    }
    boolean isHtml = HtmlUtil.isHtmlTagContainingFile(element);
    if (!checkHtml(element, isHtml)) {
      return;
    }

    Collection<PsiReference> unresolved = getUnresolvedReferencesToAnnotate(Arrays.copyOfRange(references, startIndex, references.length));
    for (PsiReference reference : unresolved) {
      holder.registerProblem(reference, ProblemsHolder.unresolvedReferenceMessage(reference),
                             isHtml ? ProblemHighlightType.GENERIC_ERROR_OR_WARNING : ProblemHighlightType.LIKE_UNKNOWN_SYMBOL);
    }
  }
private void checkRefs(@NotNull XmlElement element, @NotNull ProblemsHolder holder, int startIndex)