Allow processing template as XML

This is an indirect way to support importing files which include HTML5
tags however it will require that template to behave like XML which the
HTML5 syntax doesn't perfectly fit.