docs: private static Set<AttributeDefinition> sortAttributes(AttributeDefinition[] attributes) {
          Set<AttributeDefinition> sortedAttrs = new LinkedHashSet<>(attributes.length);
          List<AttributeDefinition> elementAds = null;
          for (AttributeDefinition ad : attributes) {
              if (ad.getParser().isParseAsElement()) {
                  if (elementAds == null) {
                      elementAds = new ArrayList<>();
                  }
                  elementAds.add(ad);
              } else {
                  sortedAttrs.add(ad);
              }
          }
          if (elementAds != null) {
              sortedAttrs.addAll(elementAds);
          }
          return sortedAttrs;
      }