*/
public static void serializeAttribute(OMAttribute attr, OMOutputImpl omOutput)
throws XMLStreamException {
// first check whether the attribute is associated with a namespace
OMNamespace ns = attr.getNamespace();
String prefix = null;
String namespaceName = null;
XMLStreamWriter writer = omOutput.getXmlStreamWriter();
if (ns != null) {
// add the prefix if it's availble
prefix = ns.getPrefix();
namespaceName = ns.getName();
if (prefix != null) {
writer.writeAttribute(prefix, namespaceName,
attr.getLocalName(), attr.getAttributeValue());
} else {
writer.writeAttribute(namespaceName, attr.getLocalName(),