// If role is set, add it in attribute definition if any.
// If no attribute definition, create untyped one, and set role.
Object attributeValue = nestedTag.getList();
if (nestedTag.getRole() != null) {
AttributeDefinition def = new UntypedAttribute(attributeValue);
def.setRole(nestedTag.getRole());
attributeValue = def;
}
// now add attribute to enclosing parent (i.e. : this object)
addElement(attributeValue);