// Not likely to happen
byteArray = xmlModel.getStructuredDocument().get().getBytes();
}
if (isDelegateValidatorEnabled(file)) {
IValidator validator = getDelegateValidator();
if (validator != null) {
// Validate the file:
IValidationContext vHelper = new MyHelper(new ByteArrayInputStream(byteArray), file);
MyReporter vReporter = new MyReporter();
if (validator instanceof IValidatorJob) {
((IValidatorJob) validator).validateInJob(vHelper, vReporter);
}
else {
validator.validate(vHelper, vReporter);
}
List messages = vReporter.list;
// set the offset and length
updateValidationMessages(messages, document, reporter);