log.warn("Neither schema instance nor schema repository defined - skipping XML schema validation");
return;
}
if (schemaRepository != null) {
if (!schemaRepository.canValidate(doc)) {
throw new CitrusRuntimeException(String.format("Unable to find proper XML schema definition for element '%s(%s)' in schema repository '%s'",
doc.getFirstChild().getLocalName(),
doc.getFirstChild().getNamespaceURI(),
schemaRepository.getName()));
}