protected void addElementDescriptor(XmlTag tag,
                                      String tagName,
                                      Map<String, XmlElementDescriptor> map,
                                      @Nullable String refName,
                                      XmlNSDescriptorImpl nsDescriptor) {
    if ("element".equals(tagName) && tag.getAttribute("name") != null) {
      XmlElementDescriptor element = nsDescriptor.createElementDescriptor(tag);
      String name = refName == null ? element.getName() : refName;
      addElementDescriptor(map, element, name);
    }
  }
protected void addElementDescriptor(XmlTag tag,
                                      String tagName,
                                      Map<String, XmlElementDescriptor> map,
                                      @Nullable String refName,
                                      XmlNSDescriptorImpl nsDescriptor)