Do you know the attributes which you need to add at design time or would it be decided at runtime ? because if you already know the attributes you can simply create two document types(one with attributes and one without) and add a map step after initial XML conversion and map the values in the second document which has attributes.
Add the elements attribute1 and attribute2 as Strings with prefix ‘@’ in their names under the request document. Such as
[HTML]
request @attribute1 @attribute2
time
[/HTML]
You can map values to these fields as usual. When you convert this into XML they will appear as attributes to request.