@@ -221,6 +221,7 @@ public class AggregateTransformer {
public void transform() throws BuildException {
public void transform() throws BuildException {
checkOptions();
checkOptions();
final long t0 = System.currentTimeMillis();
try {
try {
Element root = document.getDocumentElement();
Element root = document.getDocumentElement();
@@ -237,9 +238,10 @@ public class AggregateTransformer {
createAllPackageDetails(root);
createAllPackageDetails(root);
}
}
} catch (Exception e){
} catch (Exception e){
e.printStackTrace();
throw new BuildException("Errors while applying transformations", e);
throw new BuildException("Errors while applying transformations", e);
}
}
final long dt = System.currentTimeMillis() - t0;
task.log("Transform time: " + dt + "ms");
}
}
/** check for invalid options */
/** check for invalid options */
@@ -447,7 +449,6 @@ public class AggregateTransformer {
*/
*/
protected void transform(Node root, String xslname, String htmlname) throws SAXException {
protected void transform(Node root, String xslname, String htmlname) throws SAXException {
try{
try{
final long t0 = System.currentTimeMillis();
XSLTInputSource xsl_source = getXSLStreamSource(xslname);
XSLTInputSource xsl_source = getXSLStreamSource(xslname);
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
File htmlfile = new File(toDir, htmlname);
File htmlfile = new File(toDir, htmlname);
@@ -458,8 +459,6 @@ public class AggregateTransformer {
}
}
task.log("Applying '" + xslname + "'. Generating '" + htmlfile + "'", Project.MSG_VERBOSE);
task.log("Applying '" + xslname + "'. Generating '" + htmlfile + "'", Project.MSG_VERBOSE);
processor.process( new XSLTInputSource(root), xsl_source, new XSLTResultTarget(htmlfile.getAbsolutePath()) );
processor.process( new XSLTInputSource(root), xsl_source, new XSLTResultTarget(htmlfile.getAbsolutePath()) );
final long dt = System.currentTimeMillis() - t0;
task.log("Transform time for " + xslname + ": " + dt + "ms");
} catch (IOException e){
} catch (IOException e){
task.log(e.getMessage(), Project.MSG_ERR);
task.log(e.getMessage(), Project.MSG_ERR);
e.printStackTrace(); //@todo bad, change this
e.printStackTrace(); //@todo bad, change this
@@ -482,7 +481,7 @@ public class AggregateTransformer {
} else {
} else {
File f = new File(styleDir, name);
File f = new File(styleDir, name);
in= new FileInputStream(f);
in= new FileInputStream(f);
systemId = f.getAbsolutePath();
systemId = "file:///" + f.getAbsolutePath();
}
}
XSLTInputSource ss = new XSLTInputSource(in);
XSLTInputSource ss = new XSLTInputSource(in);
ss.setSystemId(systemId);
ss.setSystemId(systemId);