}
final protected Collection validate(Map objectModel, String instanceId, String[] xpaths) throws InvalidXPathSyntaxException, NoSuchNodeException {
Instance instance = getInstance(objectModel, instanceId);
Preceptor preceptor = instance.getPreceptor();
ArrayList allErrors = null;
for (int i = 0; i < xpaths.length; i++) {
Collection errors = preceptor.validate(instance, xpaths[i], null);
if (errors != null) {
if (allErrors == null) allErrors = new ArrayList(1);
allErrors.addAll(errors);
}
}