title: Passing input files into a transformer
body: <p>I want to be able to pass my input files and output files into this program with a seperate main method. My intentions are to access this through a GUI.</p>
  
  <pre><code>public class SimpleTransform {
      public static void main(String[] args) throws TransformerException, TransformerConfigurationException, FileNotFoundException, IOException {  
          // Use the static TransformerFactory.newInstance() method to instantiate 
          TransformerFactory tFactory = TransformerFactory.newInstance();
          Transformer transformer = tFactory.newTransformer(new StreamSource("demiprocess.xsl")); 
          transformer.transform(new StreamSource("Anzer.xml"), new StreamResult(new FileOutputStream("lee.xml")));
          System.out.println("*The result is in birds.out ***");
      }
  }
  </code></pre>
  
  <p>This is what I tried but I keep getting errors:</p>
  
  <pre><code>public class Simple {
      private String xmlFile ;
      private String xslFile;
      private String  outputFile;
  
  
      /**
       * Constructor for objects of class Simple
       */
      public Simple(String xmlFile, String xslFile,String outputFile) {
          this.xmlFile = xmlFile;
          this.xslFile = xslFile;
          this.outputFile= outputFile;
      }
  
      public String SimpleTransform() throws TransformerException,TransformerConfigurationException,FileNotFoundException, IOException {
          String mystring = "";
          TransformerFactory tFactory = TransformerFactory.newInstance();
          Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
          transformer.transform(new StreamSource(xmlFile), new StreamResult(new FileOutputStream(outputFile)));
          return mystring = "***The result is in birds.out *****";
      } 
  }
  </code></pre>
  
  <p>i get this error "file:///C:/Users/Abiodun/Desktop/New%20system/new%20system/demiprocess.xsl; Line #1; Column #10; stylesheet requires attribute: version"</p>