- import java.io.*;
-
- public class XSLTransform {
-
-
- public static void main(String [] argl)throws javax.xml.transform.TransformerException {
-
- File xmlFile = new File("/var/www/html/tomcat/sogescom/doc",arg[0]);
- File xsltFile = new File("/var/www/html/tomcat/sogescom/gestion",arg[1]);
- File htmlFile = new File("/var/www/html/tomcat/sogescom/gestion",arg[2]);
-
- javax.xml.transform.Source xmlSource =
- new javax.xml.transform.stream.StreamSource(xmlFile);
- javax.xml.transform.Source xsltSource =
- new javax.xml.transform.stream.StreamSource(xsltFile);
- javax.xml.transform.Result result =
- new javax.xml.transform.stream.StreamResult(htmlFile);
-
-
- javax.xml.transform.TransformerFactory transFact =
- javax.xml.transform.TransformerFactory.newInstance();
-
- javax.xml.transform.Transformer trans =
- transFact.newTransformer(xsltSource);
-
- trans.transform(xmlSource, result);
-
-
-
- }
-
- }
import java.io.*;
public class XSLTransform {
public static void main(String [] argl)throws javax.xml.transform.TransformerException {
File xmlFile = new File("/var/www/html/tomcat/sogescom/doc",arg[0]);
File xsltFile = new File("/var/www/html/tomcat/sogescom/gestion",arg[1]);
File htmlFile = new File("/var/www/html/tomcat/sogescom/gestion",arg[2]);
javax.xml.transform.Source xmlSource =
new javax.xml.transform.stream.StreamSource(xmlFile);
javax.xml.transform.Source xsltSource =
new javax.xml.transform.stream.StreamSource(xsltFile);
javax.xml.transform.Result result =
new javax.xml.transform.stream.StreamResult(htmlFile);
javax.xml.transform.TransformerFactory transFact =
javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer trans =
transFact.newTransformer(xsltSource);
trans.transform(xmlSource, result);
}
}