skippedcount++;
}
}
}
GlobPatternMapper mapper = new GlobPatternMapper();
String inputExtension = ".fo";
File xsltFile = task.getXsltFile();
if (xsltFile != null) {
inputExtension = ".xml";
}
mapper.setFrom("*" + inputExtension);
mapper.setTo("*" + newExtension);
// deal with the filesets
for (int i = 0; i < task.getFilesets().size(); i++) {
FileSet fs = (FileSet) task.getFilesets().get(i);
DirectoryScanner ds = fs.getDirectoryScanner(task.getProject());
String[] files = ds.getIncludedFiles();
for (int j = 0; j < files.length; j++) {
File f = new File(fs.getDir(task.getProject()), files[j]);
File outf = null;
if (task.getOutdir() != null && files[j].endsWith(inputExtension)) {
String[] sa = mapper.mapFileName(files[j]);
outf = new File(task.getOutdir(), sa[0]);
} else {
outf = replaceExtension(f, inputExtension, newExtension);
if (task.getOutdir() != null) {
outf = new File(task.getOutdir(), outf.getName());