private void validateRouting(SchemaValidator validator, Tuple2<File, String> directory) throws IOException {
        File dir = directory.first;
        if ( ! dir.isDirectory()) return;

        String directoryName = directory.second;
        for (File f : dir.listFiles(xmlFilter)) {
            if (f.isDirectory())
                validateRouting(validator, new Tuple2<>(f, directoryName + File.separator + f.getName()));
            else
                validator.validate(f, directoryName + File.separator + f.getName());
        }
    }
Validation of xml files in application package against RELAX NG schemas.

@author hmusum
config-application-package/src/main/java/com/yahoo/config/model/application/provider/ApplicationPackageXmlFilesValidator.java