follow xtmpl api
upgrade to xtmpl with maps for attributs