// Read the JiBX binding definition into memory. The binding definition
// is only prevalidated so as not to require the user to have all
// the referenced classes in the classpath, though this does make for
// added work in finding the namespaces.
ValidationContext vctx = BindingElement.newValidationContext();
binding = BindingElement.readBinding(new FileInputStream(file), path, vctx);
binding.setBaseUrl(file.toURL());
vctx.setBindingRoot(binding);
IncludePrevalidationVisitor ipv = new IncludePrevalidationVisitor(vctx);
vctx.tourTree(binding, ipv);
if (vctx.getErrorCount() != 0 || vctx.getFatalCount() != 0) {
throw new RuntimeException("invalid jibx binding definition file " + path);
}
}
// create table with all built-in format definitions