Node:Source to target, Next:, Previous:Overview, Up:Overview



Source to target

The basic operation Transbuild performs is to take files and directories from under a source directory and generates a set of files and directories under a target directory. The set of subdirectories and files will be called a "tree." Think of it as a fancy recursive directory copy. Each subdirectory in the source tree is recreated in the target tree. Each source file creates a corresponding target file.

The recursive copy doesn't just copy files, but can transform them. The most common way is to apply an XSLT script to the source file to create the target file. For example, taking every individual XML file in the source tree and transforming them to HTML files in the target tree. It can also detect which source file has been changed, and only rebuild that file. Think of it as a fancy version of make, or a program that applies XSLT to a batch of files.

Rules can be written so that different types of files can be treated differently, applying a different set of transformations to them. Also, the names of the files can be modified according to rules. For example, .xml source files can be renamed to .html target files after applying the transformations.