static <T> Writer<T> attr(final String name) {
		requireNonNull(name);

		return (xml, data) -> {
			if (data != null) {
				xml.writeAttribute(name, data.toString());
			}
		};
	}
Writes the attribute with the given {@code name} to the current
<em>outer</em> element.

{@snippet lang="java":
final Writer<String> writer1 = elem("element", attr("attribute"));
}

@see #attr(String, Object)

@param name the attribute name
@param <T> the writer base type
@return a new writer instance
@throws NullPointerException if the attribute {@code name} is {@code null}
jenetics.xml/src/main/java/io/jenetics/xml/stream/Writer.java