// javadoc inherited
public void setPipeline(XMLPipeline pipeline) {
super.setPipeline(pipeline);
// get hold of the pipeline context
XMLPipelineContext context = getPipelineContext();
// get hold of the pipeline configuration
XMLPipelineConfiguration pipelineConfiguration =
context.getPipelineConfiguration();
// retrieve the configuration
Configuration config =
pipelineConfiguration.retrieveConfiguration(
AbsoluteToRelativeURLConfiguration.class);
if (config == null ||
!(config instanceof AbsoluteToRelativeURLConfiguration)) {
// cannot get hold of the configuration. As this is fatal
// deliver a fatal error down the pipeline
XMLPipelineException error = new XMLPipelineException(
"Could not retrieve the Absolute to Relative URL " +
"converter configuration",
context.getCurrentLocator());
try {
pipeline.getPipelineProcess().fatalError(error);
} catch (SAXException e) {
// cannot continue so throw a runtime exception