Compile-time output validation

Given an XML transformation T and an XML schema S, is it the case that whenever T outputs an XML document X, then X is valid with respect to S?

Rice's Theorem (informal version):
All interesting properties of the behavior of a program written in a Turing complete language are undecidable