title: XSLT processing with Xalan APi 2.7.1
body: <p>I have to do xsl transformations in which I will pass the sample input xml to finally achieved the final transformation xml , I have written the program using  java api of a transformer , can some body please advise how canI write the same so that it works with xalan api 2.7.1 also , below is the code with jaa which I need to convert it with xalan compatible</p>
  
  <pre><code>import javax.xml.transform.*;
  import javax.xml.transform.stream.StreamResult;
  import javax.xml.transform.stream.StreamSource;
  import java.io.File;
  import java.io.IOException;
  import java.net.URISyntaxException;
  
  public class TestMain {
      public static void main(String[] args) throws IOException, URISyntaxException, TransformerException {
          TransformerFactory factory = TransformerFactory.newInstance();
          Source xslt = new StreamSource(new File("transform.xslt"));
          Transformer transformer = factory.newTransformer(xslt);
  
          Source text = new StreamSource(new File("input.xml"));
          transformer.transform(text, new StreamResult(new File("output.xml")));
      }
  } 
  </code></pre>