protected void configurePipeline() {
// setup document pipeline
super.configurePipeline();
// insert before fSchemaValidator, if one exists.
XMLDocumentSource prev = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
prev = fSchemaValidator.getDocumentSource();
}
// Otherwise, insert after the last component in the pipeline
else {
prev = fLastComponent;
}
if (prev != null) {
XMLDocumentHandler next = prev.getDocumentHandler();
if (next != null) {
fXIncludeHandler.setDocumentHandler(next);
next.setDocumentSource(fXIncludeHandler);
}
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
}
else {
setDocumentHandler(fXIncludeHandler);
}