Improve XPTemplateView() fuction.