IPerson person = staticData.getPerson();
Document doc = DocumentFactory.getNewDocument();
Element attributesE = doc.createElement("attributes");
IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
Set<String> possibleAttrs = pa.getPossibleUserAttributeNames();
if (possibleAttrs != null)
possibleAttrs = new HashSet<String>(possibleAttrs);
else
possibleAttrs = new HashSet<String>();
for (Map.Entry<String,List<Object>> y : pa.getPerson(person.getUserName()).getAttributes().entrySet()) {
// Remove this attr from the list of possible attrs
possibleAttrs.remove(y.getKey());
// Set the attribute