*/
public void validate(Source source, Result result)
throws SAXException, IOException {
if (result instanceof DOMResult || result == null) {
final DOMSource domSource = (DOMSource) source;
final DOMResult domResult = (DOMResult) result;
//MF
Node node = (Node) domSource.getNode();
fRoot = node;
if (node != null) {
fComponentManager.reset();
fValidationManager.setEntityState(this);
fDOMNamespaceContext.reset();
String systemId = domSource.getSystemId();
fXMLLocator.setLiteralSystemId(systemId);
fXMLLocator.setExpandedSystemId(systemId);
fErrorReporter.setDocumentLocator(fXMLLocator);
try {
// regardless of what type of node this is, fire start and end document events