code: private static void addAttribute(Element element, Set<Attr> attributes, Object value) {
  		Attr attr = (Attr) value;
  		if (!attributes.add(attr)) {
  			throw new TemplateException("Invalid element |%s|. It has both static attribute |%s| and attribute operator.", element, attr.getName());
  		}
  	}
docs: Helper method to add an attribute to a set.
  
  @param element attribute to add owning element, for debugging,
  @param attributes set of attributes,
  @param value attribute value to add.