This is probably a holywarish topic, but nevertheless.
In a perfect content management system of your dream, would you rather want a templating system that is completely, 100% separate from your code, and uses declarative syntax to produce (X)HTML (such as <your code> -> DOM/XML -> XSLT -> HTML), or would you rather choose a system that lets your code cook HTML fragments, and then runs some template assembly to put these pieces together to output a complete page?
Thanks in advance.
EDIT
To make it probably a bit more clear, I mean that HTML is a declarative 'language', whereas most of the dynamic stuff is done in imperative/functional languages. Templates glue the two together, but the way they do it isn't always clean (as in clean separation of paradigms).