Use template engine in Xdm