[WIP] xml template improvements