((Element)currentNode).setAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName(), buffer.toString());
Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); attr.setNodeValue(buffer.toString()); ((Element)currentNode).setAttributeNodeNS(attr); handler.recordValues(attr, o, f, value);
  protected void saveEObjectSingle(EObject o, EStructuralFeature f)  {    EObject value = (EObject)helper.getValue(o, f);    if (value != null)    {      String id = helper.getHREF(value);      if (id != null)      {        if (escapeURI != null)        {          id = escapeURI.convert(id);        }        buffer.setLength(0);        if (!id.startsWith("#"))        {          EClass eClass = value.eClass();          EClass expectedType = (EClass)f.getEType();          if (eClass != expectedType && (saveTypeInfo || expectedType.isAbstract()))          {            buffer.append(helper.getQName(eClass));            buffer.append(" ");          }        }        buffer.append(id);        if (!toDOM)        {          String name = helper.getQName(f);          doc.startAttribute(name);          doc.addAttributeContent(buffer.toString());          doc.endAttribute();        }        else        {          helper.populateNameInfo(nameInfo, f);          ((Element)currentNode).setAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName(), buffer.toString());        }      }    }  }