code: public XMLSerializer attribute(String namespace, String name, String value) throws IOException {
  		if (!startTagIncomplete) {
  			throw new IllegalArgumentException("startTag() must be called before attribute()" + getLocation());
  		}
  		// assert setPrefixCalled == false;
  		out.write(' ');
  		//// assert namespace != null;
  		if (namespace != null && namespace.length() > 0) {
  			// namespace = namespace.intern();
  			if (!namesInterned) {
  				namespace = namespace.intern();
  			} else if (checkNamesInterned) {
  				checkInterning(namespace);
  			}
  			String prefix = getPrefix(namespace, false, true);
  			// assert( prefix != null);
  			// if(prefix.length() == 0) {
  			if (prefix == null) {
  				// needs to declare prefix to hold default namespace
  				// NOTE: attributes such as a='b' are in NO namespace
  				prefix = generatePrefix(namespace);
  			}
  			out.write(prefix);
  			out.write(':');
  			// if(prefix.length() > 0) {
  			// out.write(prefix);
  			// out.write(':');
  			// }
  		}
  		// assert name != null;
  		out.write(name);
  		out.write('=');
  		// assert value != null;
  		out.write(attributeUseApostrophe ? '\'' : '"');
  		writeAttributeValue(value, out);
  		out.write(attributeUseApostrophe ? '\'' : '"');
  		return this;
  	}
docs: Attribute.
  
  @param namespace the namespace
  @param name the name
  @param value the value
  @return serializer
  @throws IOException Signals that an I/O exception has occurred.