You need to create definitions instead of templates. You can get started here msdn.microsoft.com/.../spxmlconONET.asp