normalize the template element