Composition over data-driven templates