// validate the root binding (which will pull in all referenced bindings)
File file = new File(dir, root.getFileName());
ValidationContext vctx = new ValidationContext(loc);
FileInputStream is = new FileInputStream(file);
BindingElement binding = BindingElement.validateBinding(root.getFileName(), file.toURI().toURL(), is, vctx);
if (binding == null || vctx.getErrorCount() > 0 || vctx.getFatalCount() > 0) {
return null;
} else {
// build and return list of validated binding definitions