code: public static void main(String[] args) {
  		if (args.length == 4) {
  			File srcdir = new File(args[0]);
  			File destdir = new File(args[1]);
  			File xsl_examples = new File(srcdir, args[2]);
  			File xsl_site = new File(srcdir, args[3]);
  			try {
  				System.out.print("Building tutorial: ");
  				root = new File(args[1], srcdir.getName()).getCanonicalPath();
  				System.out.println(root);
  				build = new FileWriter(new File(root, "build.xml"));
  				build.write("<project name=\"tutorial\" default=\"all\" basedir=\".\">\n");
  				build.write("<target name=\"all\">\n");
  				action(srcdir, destdir, xsl_examples, xsl_site);
  				build.write("</target>\n</project>");
  				build.flush();
  				build.close();
  			}
  			catch(IOException ioe) {
  				ioe.printStackTrace();
  			}
  		} else {
  			System.err
  					.println("Wrong number of parameters.\nUsage: BuildSite srcdr destdir xsl_examples xsl_site");
  		}
  	}
docs: Main method so you can call the convert method from the command line.
  @param args 4 arguments are expected:
  <ul><li>a sourcedirectory (root of the tutorial xml-files),
  <li>a destination directory (where the html and build.xml files will be generated),
  <li>an xsl to transform the index.xml into a build.xml
  <li>an xsl to transform the index.xml into am index.html</ul>