for xtemplate 3.1.x