code: public void appendOptionalAttribute(final String name, final boolean flag, final Object value) {
  		if (flag) {
  			appendAttribute(name, value);
  		}
  	}
docs: <p>
  If the flag is true, add an xml attribute name+value pair to the end of this XmlStringBuilder
  <p>
  Eg. name="value"
  </p>
  
  @param name the name of the boolean attribute to be added.
  @param flag should this attribute be set.
  @param value the value of the attribute.