Hi,
I am using apache-ant-1.6.5 api to generate report in html format.
The code snippet :
XSLTProcess xslt_process = new XSLTProcess();
xslt_process.setProject(p2);
//xslt_process.setBasedir(new File(base_dir));
xslt_process.setTaskName("xsltTask");
//xslt_process.setProcessor("xalan");
xslt_process.setIn(new File(qalab_file));
xslt_process.setOut(new File(style_dir+File.separator+"hist.html"));
xslt_process.setStyle(output_dir+File.separator+"qalab-chart-html.xsl");
xslt_process.setForce(true);
//xslt_process.setDestdir(outputDir);
XSLTProcess.Param xslt_process_param = xslt_process.createParam();
//xslt_process_param.setName("targetdir");
// xslt_process_param.setExpression(style_dir);
xslt_process_param.setName("type");
xslt_process_param.setExpression("pmd");
xslt_process.execute();
Target xsltTask = new Target();
xsltTask.setName("xsltTask");
It's o.k while running in Windows enviornment yet the param
"targetdir" is not working. It results in the target directory due to the line
xslt_process.setOut(new File(style_dir+File.separator+"hist.html"));
But it is unable to create all html in the target directory when it run in
Linux.
I think if the two lines
xslt_process_param.setName("targetdir");
xslt_process_param.setExpression(style_dir);
works then the problem will be solved.
Can any one say me why these two lines not working Or let me where i am wrong?
Thanks in advance.....
Subir
---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers