Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » transformation » [javadoc | source]
org.apache.cocoon.transformation
public class: FragmentExtractorTransformer [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.xml.AbstractXMLPipe
            org.apache.cocoon.transformation.AbstractTransformer
               org.apache.cocoon.transformation.FragmentExtractorTransformer

All Implemented Interfaces:
    org.apache.avalon.framework.activity.Disposable, CacheableProcessingComponent, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, Transformer, XMLPipe, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

The transformation half of the FragmentExtractor. This transformer recieves an incoming stream of xml and replaces fragments with an fragment extractor locator pointing to the fragments. The extracted fragments are identified by their element name and namespace URI. The default is to extract SVG images ("svg" elements in namespace "http://www.w3.org/2000/svg"), but this can be overriden in the configuration:
<extract-uri>http://my/namespace/uri</extract-uri>
<extract-element>my-element</extract-element>
Fragment extractor locator format is following:
<fe:fragment xmlns:fe="http://apache.org/cocoon/fragmentextractor/2.0" fragment-id="..."/>
Field Summary
public static final  String FE_URI     
protected  ServiceManager manager    The ServiceManager instance 
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Method from org.apache.cocoon.transformation.FragmentExtractorTransformer Summary:
characters,   comment,   configure,   dispose,   endCDATA,   endDTD,   endElement,   endEntity,   endPrefixMapping,   getKey,   getValidity,   ignorableWhitespace,   processingInstruction,   recycle,   service,   setup,   skippedEntity,   startCDATA,   startDTD,   startElement,   startEntity,   startPrefixMapping
Methods from org.apache.cocoon.xml.AbstractXMLPipe:
characters,   comment,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endPrefixMapping,   ignorableWhitespace,   processingInstruction,   setDocumentLocator,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startPrefixMapping
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.transformation.FragmentExtractorTransformer Detail:
 public  void characters(char[] c,
    int start,
    int len) throws SAXException 
    Receive notification of character data.
 public  void comment(char[] ch,
    int start,
    int len) throws SAXException 
    Report an XML comment anywhere in the document.
 public  void configure(Configuration conf) throws ConfigurationException 
    Configure this transformer.
 public  void dispose() 
    Release all resources.
 public  void endCDATA() throws SAXException 
    Report the end of a CDATA section.
 public  void endDTD() throws SAXException 
    Report the end of DTD declarations.
 public  void endElement(String uri,
    String loc,
    String raw) throws SAXException 
    Receive notification of the end of an element.
 public  void endEntity(String name) throws SAXException 
    Report the end of an entity.
 public  void endPrefixMapping(String prefix) throws SAXException 
    End the scope of a prefix-URI mapping.
 public Serializable getKey() 
    Generate the unique key. This key must be unique inside the space of this component.
 public SourceValidity getValidity() 
    Generate the validity object.
 public  void ignorableWhitespace(char[] c,
    int start,
    int len) throws SAXException 
    Receive notification of ignorable whitespace in element content.
 public  void processingInstruction(String target,
    String data) throws SAXException 
    Receive notification of a processing instruction.
 public  void recycle() 
    Recycle this component
 public  void service(ServiceManager manager) throws ServiceException 
    Set the current ServiceManager instance used by this Serviceable.
 public  void setup(SourceResolver resolver,
    Map objectModel,
    String src,
    Parameters parameters) throws IOException, SAXException, ProcessingException 
    Setup the transformer.
 public  void skippedEntity(String name) throws SAXException 
    Receive notification of a skipped entity.
 public  void startCDATA() throws SAXException 
    Report the start of a CDATA section.
 public  void startDTD(String name,
    String publicId,
    String systemId) throws SAXException 
    Report the start of DTD declarations, if any.
 public  void startElement(String uri,
    String loc,
    String raw,
    Attributes a) throws SAXException 
    Receive notification of the beginning of an element.
 public  void startEntity(String name) throws SAXException 
    Report the beginning of an entity.
 public  void startPrefixMapping(String prefix,
    String uri) throws SAXException 
    Begin the scope of a prefix-URI Namespace mapping.