private @Nullable Map<String, String> buildPredefinedValues(@NotNull Map<String, String> attributes,
                                                              @Nullable XmlZenCodingGenerator generator,
                                                              boolean hasChildren) {
    if (generator == null) {
      return Collections.emptyMap();
    }

    for (String value : attributes.values()) {
      if (ZenCodingUtil.containsSurroundedTextMarker(value)) {
        myContainsSurroundedTextMarker = true;
        break;
      }
    }

    String attributesString = generator.buildAttributesString(attributes, hasChildren, myNumberInIteration, myTotalIterations, mySurroundedText);
    attributesString = attributesString.length() > 0 ? ' ' + attributesString : null;
    Map<String, String> predefinedValues = null;
    if (attributesString != null) {
      predefinedValues = new HashMap<>();
      predefinedValues.put(TemplateToken.ATTRS, attributesString);
    }
    return predefinedValues;
  }
private @Nullable Map<String, String> buildPredefinedValues(@NotNull Map<String, String> attributes,
                                                              @Nullable XmlZenCodingGenerator generator,
                                                              boolean hasChildren)