return validate_document_or_file(context, xmlDocument);
}
IRubyObject validate_document_or_file(ThreadContext context, XmlDocument xmlDocument) {
RubyArray errors = (RubyArray) this.getInstanceVariable("@errors");
ErrorHandler errorHandler = new SchemaErrorHandler(context.getRuntime(), errors);
setErrorHandler(errorHandler);
try {
validate(xmlDocument.getDocument());
} catch(SAXException ex) {