@Override
  public PsiReference[] getValueReferences(final XmlElement element, @NotNull String text) {
    if (element.getContainingFile() instanceof HtmlCompatibleFile) {
      return new PsiReference[]{new HtmlEnumeratedValueReference(element, this, null) {
        @Nullable
        @Override
        public PsiElement resolve() {
          if (isTokenDatatype(getValue())) {
            return getElement();
          }
          return super.resolve();
        }
      }};
    }
    else {
      return new PsiReference[]{new XmlEnumeratedValueReference(element, this) {
        @Nullable
        @Override
        public PsiElement resolve() {
          if (isTokenDatatype(getValue())) {
            return getElement();
          }
          return super.resolve();
        }
      }};
    }
  }
@Override
  public PsiReference[] getValueReferences(final XmlElement element, @NotNull String text)