Use format_attributes to format sub attributes