Class CleaningTransformer

  extended by org.apache.cocoon.pipeline.component.AbstractPipelineComponent
      extended by org.apache.cocoon.stax.AbstractStAXPipelineComponent
          extended by org.apache.cocoon.stax.AbstractStAXProducer
              extended by org.apache.cocoon.stax.AbstractStAXTransformer
                  extended by org.apache.cocoon.stax.component.CleaningTransformer
All Implemented Interfaces:
Consumer, PipelineComponent, Producer, StAXConsumer, StAXPipelineComponent, StAXProducer

public class CleaningTransformer
extends AbstractStAXTransformer

Transformer which is used to clean a xml document from all whitespaces, comments and namespace start prefixes and end prefixes. Works similar to the CleaningTransformer for SAX pipelines.

Constructor Summary
Method Summary
 void produceEvents()
          Template method which has to produce at least one XMLEvent and should add this to the internal Queue with the #add(XMLEvent) and #addAll(Collection) methods.
Methods inherited from class org.apache.cocoon.stax.AbstractStAXTransformer
addAllEventsToQueue, addEventToQueue, getParent, hasNext, initiatePullProcessing, isQueueEmpty, nextEvent, peek, setParent
Methods inherited from class org.apache.cocoon.stax.AbstractStAXProducer
getConsumer, setConsumer
Methods inherited from class org.apache.cocoon.pipeline.component.AbstractPipelineComponent
finish, setConfiguration, setup
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.cocoon.pipeline.component.PipelineComponent
finish, setConfiguration, setup

Constructor Detail


public CleaningTransformer()
Method Detail


public void produceEvents()
                   throws XMLStreamException
Template method which has to produce at least one XMLEvent and should add this to the internal Queue with the #add(XMLEvent) and #addAll(Collection) methods. If no XMLEvent is added by this method to the internal Queue an exception is thrown.

Specified by:
produceEvents in class AbstractStAXTransformer
XMLStreamException - thrown if the StAXProducer.nextEvent() or the StAXProducer.peek() method, called in the AbstractStAXTransformer.produceEvents() method throw any exceptions they have to be forwarded to the end of the pipeline.
See Also:

Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.