public RngXmlAttributeDescriptor mergeWith(RngXmlAttributeDescriptor d) {
    final QName name = d.myName.equals(UNKNOWN) ? myName : d.myName;

    Map<String, String> values = new LinkedHashMap<>(myValues);
    values.putAll(d.myValues);

    Set<Locator> locations = CollectionFactory.createCustomHashingStrategySet(HASHING_STRATEGY);
    locations.addAll(myDeclarations);
    locations.addAll(d.myDeclarations);
    return new RngXmlAttributeDescriptor(myElementDescriptor, name, values, myOptional || d.myOptional, locations.toArray(new Locator[0]));
  }
public RngXmlAttributeDescriptor mergeWith(RngXmlAttributeDescriptor d)