public boolean validateDocument(Document document, URL xmlSchemaURL, ErrorHandler errorHandler) throws XMLPlatformException {
XMLSchema xmlSchema = null;
XSDValidator validator = null;
try {
Object[] args = { xmlSchemaURL };
xmlSchema = (XMLSchema)buildSchemaMethod.invoke(new XSDBuilder(), args);
validator = new XSDValidator();
} catch (Exception e) {
throw XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(xmlSchemaURL, e);
}