*/
public static void generateDTDFromXML(File input,File output) throws Exception {
ErrorHandlerImpl eh = new ErrorHandlerImpl();
OutputFormat of = new DtdOutputFormat();
InputFormat inFormat = new XmlInputFormat();
SchemaCollection sc = inFormat.load(
UriOrFile.toUri(input.getAbsolutePath()), new String[0], "dtd", eh);
OutputDirectory od = new LocalOutputDirectory(
sc.getMainUri(),output,"xml","utf-8",80,4);