Sort attributes alphabetically, to help with output stability.