ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From subir bhaumik <subir...@yahoo.co.in>
Subject XSLT Task
Date Wed, 31 Jan 2007 14:08:49 GMT
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

 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message