fr.gouv.culture.sdx.pipeline
Class XSLTTransformation

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.xml.AbstractXMLProducer
              |
              +--org.apache.cocoon.xml.AbstractXMLPipe
                    |
                    +--fr.gouv.culture.sdx.pipeline.AbstractTransformation
                          |
                          +--fr.gouv.culture.sdx.pipeline.XSLTTransformation
All Implemented Interfaces:
org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, Transformation, org.apache.cocoon.xml.XMLConsumer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer

public class XSLTTransformation
extends AbstractTransformation

A transformation using an XSLTProcessorImpl from Cocoon Basically a wrapper to provide a certain configuration option (stylesheet specification) and forwards events to a consumer after the transformation has been executed.


Field Summary
 
Fields inherited from class fr.gouv.culture.sdx.pipeline.AbstractTransformation
id, logger, manager, PARAMETER_NAME_DISABLE, PARAMETER_NAME_ENABLE, parameters, props, transParameters
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, lexicalHandler, xmlConsumer
 
Fields inherited from interface fr.gouv.culture.sdx.pipeline.Transformation
ATTRIBUTE_ID, ATTRIBUTE_KEEP, ATTRIBUTE_SRC, ATTRIBUTE_TH, ATTRIBUTE_TYPE, CLASS_NAME_SUFFIX, ELEMENT_NAME_TRANSFORMATION, PACKAGE_QUALNAME
 
Constructor Summary
XSLTTransformation()
          Creates the transformation If logging is desired the logger should be set after creation.
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
          Builds this object In addition to the parameters needed in the base configuration handled by the parent class, the "src" parameter is required and can be absolute or relative to the directory containing the application.xconf file or relative to the SDX installation.
 void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
          Sets the XMLConsumer for this transformation.
 void startDocument()
           
 
Methods inherited from class fr.gouv.culture.sdx.pipeline.AbstractTransformation
compose, enableLogging, getId, getParameters, isStepEnabled, recycle, setParameters, setProperties, shouldKeepResult, verifyConfigurationParameters
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
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, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 

Constructor Detail

XSLTTransformation

public XSLTTransformation()
Creates the transformation If logging is desired the logger should be set after creation. This transformation should be composed, properties set, and then configured.

See Also:
AbstractTransformation.enableLogging(org.apache.avalon.framework.logger.Logger), AbstractTransformation.compose(org.apache.avalon.framework.component.ComponentManager), AbstractTransformation.setProperties(java.util.Hashtable), configure(org.apache.avalon.framework.configuration.Configuration)
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Builds this object In addition to the parameters needed in the base configuration handled by the parent class, the "src" parameter is required and can be absolute or relative to the directory containing the application.xconf file or relative to the SDX installation.

Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class AbstractTransformation
Parameters:
configuration - An Configuration object from the Pipeline

Sample configuration entry:

<sdx:transformation src = "path to stylesheet, can be absolute or relative to the directory containing this file" sdx:id = "step3" sdx:type = "xslt" keep = "true"/>

Throws:
org.apache.avalon.framework.configuration.ConfigurationException

setConsumer

public void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Sets the XMLConsumer for this transformation.

Specified by:
setConsumer in interface org.apache.cocoon.xml.XMLProducer
Overrides:
setConsumer in class org.apache.cocoon.xml.AbstractXMLProducer
Parameters:
consumer - The consumer for the SAX events of this transformation

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.apache.cocoon.xml.AbstractXMLPipe
org.xml.sax.SAXException


Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.