ValidationResult result = attrs.validate(iod);
if (result.isValid())
System.out.println("OK");
else {
System.out.println("FAILED:");
System.out.println(result.asText(attrs));
}
} catch (IOException e) {
System.out.println("FAILED: " + e.getMessage());
} finally {
SafeClose.close(dis);