// Parse the stylesheet.
reader.parse(args[0]);
//Get the Templates object from the ContentHandler.
Templates templates = templatesBuilder.getTemplates();
// III. Use the Templates object to instantiate a Transformer.
Transformer transformer = templates.newTransformer();
// IV. Perform the transformation.
// Set up the ContentHandler for the output.
FileOutputStream fos = new FileOutputStream(args[2]);