Added virtual method WriteAttributes, as an extension point. Also the current part is included in tag and attribute writes