now outputs an XML header if no template is given