support macro for xtemplate. Fixes #449