Consolidate the code for serializing attributes
Created by: mfwitten
The attributes id
and xml:id
have been handled specially, though there has been little advantage in doing so. After merging this pull request, the same code will be used to handle every attribute.