code: public void write(XMLStreamWriter writer, AttributeDefinition<?> def) throws XMLStreamException {
        write(writer, def, def.xmlName());
     }
docs: Writer a single attribute to the specified {@link XMLStreamWriter} using the attribute's xmlName
  @param writer the writer
  @param def the Attribute definition
  @throws XMLStreamException