From a hairy template string, to a groomed DOM based template.