private Attributes getAttributesFromDN(Name name)
throws InvalidNameException {
if (name instanceof LdapName) {
Rdn rdn = ((LdapName) name).getRdn(name.size() - 1);
return rdn.toAttributes();
}
if (name instanceof CompositeName) {
if (name.size() == 0) {
return new BasicAttributes(true);