xml in a template
namings and type fixes