// the events once, on first use of this value, in DEFERRED mode,
// thereafter simply replaying these preprocessed events
XMLPipelineFactory factory = context.getPipelineFactory();
PipelineRecorder processedEventRecorder =
factory.createPipelineRecorder();
processedEventRecorder.startRecording(target);
// The following process collects the preprocessed events
// without permitting the events to be replayed to the rest
// of the pipeline. This allows the preprocessing to be
// performed before checking the complexity of the SAX