code: public XMLAttributeList addOptionalAttribute(@Nonnull String name, @CheckForNull String value) {
          if (value == null) {
              return this;
          }
          return addAttribute(name, value);
      }
docs: Add a single attribute name and value.
  
  @param name
  the attribute name
  @param value
  the attribute value
  @return this object (so calls to addAttribute() can be chained)