org.apache.cocoon.transformation
Class StripNameSpacesTransformer

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.xml.AbstractXMLPipe
              extended byorg.apache.cocoon.transformation.AbstractTransformer
                  extended byorg.apache.cocoon.transformation.StripNameSpacesTransformer
All Implemented Interfaces:
org.apache.cocoon.caching.CacheableProcessingComponent, ContentHandler, LexicalHandler, Poolable, Recyclable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, XMLConsumer, org.apache.cocoon.xml.XMLConsumer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer

public class StripNameSpacesTransformer
extends org.apache.cocoon.transformation.AbstractTransformer
implements org.apache.cocoon.caching.CacheableProcessingComponent

The StripNameSpacesTransformer is a class that can be plugged into a pipeline to strip all namespaces from a SAX stream. It is much faster (certainly for larger streams, but easily factor 100) then the conventional stripnamespaces.xsl

Version:
$Id: StripNameSpacesTransformer.html 1304280 2012-03-23 11:18:01Z ilgrosso $
Author:
ard schrijvers

Field Summary
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.transformation.Transformer
ROLE
 
Constructor Summary
StripNameSpacesTransformer()
           
 
Method Summary
 void endElement(String uri, String localName, String qName)
           
 void endPrefixMapping(String prefix)
           
 Serializable getKey()
           
 SourceValidity getValidity()
           
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String src, Parameters params)
           
 void startElement(String uri, String localName, String qName, Attributes attr)
           
 void startPrefixMapping(String prefix, String uri)
           
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
recycle, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Constructor Detail

StripNameSpacesTransformer

public StripNameSpacesTransformer()
Method Detail

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters params)
           throws org.apache.cocoon.ProcessingException,
                  SAXException,
                  IOException
Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException

getKey

public Serializable getKey()
Specified by:
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponent

getValidity

public SourceValidity getValidity()
Specified by:
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponent

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Throws:
SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attr)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Throws:
SAXException


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.