// Writes a new attribute.
private void writeAttributeOrNamespace(CharSequence prefix,
CharSequence namespaceURI, CharSequence localName,
CharSequence value) throws XMLStreamException {
if (!_isElementOpen)
throw new IllegalStateException("No open start element");
write(' ');
// Writes prefix if any.
if ((namespaceURI != null)
&& (!_namespaces._defaultNamespace.equals(namespaceURI))) {