bug #2025: Generate full template for XML driver
(cherry picked from commit b79838f5498810c69e38c7a3fce29d7cb3189ae1)
bug #2025: Use EC2 attribute from USER_TEMPLATE
(cherry picked from commit 94813343fed8ebb560b289435fe8dfa4c97addfb)