*/
public void transform() throws BuildException {
checkOptions();
Project project = task.getProject();
TempFile tempFileTask = new TempFile();
tempFileTask.bindToOwner(task);
XSLTProcess xsltTask = new XSLTProcess();
xsltTask.bindToOwner(task);
xsltTask.setXslResource(getStylesheet());
// acrobatic cast.
xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile());
File outputFile = null;
if (format.equals(FRAMES)) {
String tempFileProperty = getClass().getName() + String.valueOf(counter++);
File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), project
.getProperty("java.io.tmpdir"));
tempFileTask.setDestDir(tmp);
tempFileTask.setProperty(tempFileProperty);
tempFileTask.execute();
outputFile = new File(project.getProperty(tempFileProperty));
} else {
outputFile = new File(toDir, "junit-noframes.html");
}
xsltTask.setOut(outputFile);