A modern approach for generating individualized web-sites is to compose a page out of individual elements, for instance XML-fragments, which is eventually transformed to . If the generated pages differ for each user, then the required transformation processes put a heavy load on the server, hence slowing down response times significantly. The learning environment ACTIVEMATH uses this composing approach to generate learning courses that suit best the needs and goals of the individual learner. For instance, depending on their current knowledge, different users that learn the same content get presented courses that differ in length and in amount and difficulty of exercises and examples. Currently, the learning materials are transformed in one step from XML to (or other output formats). The learning materials are encoded in a language called OMDoc which encodes semantically the fragments as well as the mathematical formulae. This article hence provides an approach to the answer ``How can ...