We show that an XML DTD (Document Type Definition) can be viewed as the fixed point of a parametric content model. Based on the parametric content model, we develop a model of modular transformation of XML documents. A fold operator is used to capture a class of functions that consume valid XML document trees in a bottom-up matter. Similarly, an unfold operator is used to generate valid XML document trees in a top-down fashion. We then show that DTD-aware XML document transformation, which consumes a document of one DTD and generates a document of another DTD, can be thought as both a fold operation and an unfold operation. This leads us to model certain DTD-aware document transformations by mappings from the source content models to the target content models. From these mappings, we derive DTD-aware XML document transformational programs. Benefits of such derived programs include automatic validation of the target documents (no invalid document will be generated) and modular property in the composition of these programs (intermediate results from successive transformations can be eliminated).