make.createExplicitRule(tempdir+"/howto.html", new String[]
{
"howto.xml",
"menumaker.xsl",
tempdir
}, "transform", true);
transform(String target, String[] prereqs)
{
tf = TransformerFactory.newInstance();
trans = tf.newTransformer(new StreamSource(new File(prereqs[1])));
trans.transform(new StreamSource(new File(prereqs[0])),
new StreamResult(new File(target)));
}
In the above example the target is the output of the transformation.
prereqs[0] is the XML file to transform and prereqs[1] is the XSL style sheet.