super.configurePipeline();
if (fSchema != null) {
if( isXNICapabaleSchema(fSchema) ) {
// if the validator is also from this Xerces,
// we will use the XNI-based validator for
// better performance
InsulatedValidatorComponent v = ((XercesSchema)fSchema).newXNIValidator();
addComponent(v);
fLastComponent.setDocumentHandler(v.getValidator());
v.getValidator().setDocumentSource(fLastComponent);
fLastComponent = v.getValidator();
v.getValidator().setDocumentHandler(fDocumentHandler);
} else {
// otherwise wrap that into JAXPValidatorComponent.
XMLDocumentFilter validator = null;
ValidatorHandler validatorHandler = fSchema.newValidatorHandler();
validator = new JAXPValidatorComponent(validatorHandler);
addComponent((XMLComponent)validator);
fLastComponent.setDocumentHandler(validator);
validator.setDocumentSource(fLastComponent);
fLastComponent = validator;
validator.setDocumentHandler(fDocumentHandler);
}
}