In charge of run-time transformations and the production of result trees.

{@link org.apache.xalan.transformer.TransformerImpl} implements the {@link javax.xml.transform.Transformer} interface, and is the core representation of the transformation execution.

For each node in the XML source, TransformerImpl uses the StylesheetRoot and underlying XSLT schema to determine which template to apply: one of the templates in the StylesheetRoot, a default template rule as specified in the XSLT spec, or none.

The Transformer works with {@link org.apache.xml.serializer.SerializationHandler} to forward the SAX-like events produced by the transformation to the appropriate output ContentHandler.

To the degree possible, the parsing of the XML source and application of the Templates object to that source are performed concurrently in separate threads. When necessary, the Transformer waits for the parse events that must be in place before a given template may be applied.