This content is currently a mess as it does some automatic stuff (using xstream, etc.) we should create a specific schema that the output will conform to and then generate the XML according to that schema. It's pretty much impossible to document how to customize the emails right now. So once this is done we should update the documentation regarding email customization in the KEW Technical Guide.
If this change is impacting (which it probably will be) it needs to be documented well in the release notes.
KRDOC-54 for example xml input to the stylesheets.