stefano 2003/02/22 06:26:07
Modified: src/blocks/deli/java/org/apache/cocoon/transformation DeliTransformer.java Log: cleanup docs and fixed compilation issues Revision Changes Path 1.2 +10 -102 xml-cocoon2/src/blocks/deli/java/org/apache/cocoon/transformation/DeliTransformer.java Index: DeliTransformer.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/deli/java/org/apache/cocoon/transformation/DeliTransformer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DeliTransformer.java 22 Feb 2003 13:57:41 -0000 1.1 +++ DeliTransformer.java 22 Feb 2003 14:26:07 -0000 1.2 @@ -51,116 +51,24 @@ package org.apache.cocoon.transformation; -import org.apache.excalibur.xml.xslt.XSLTProcessor; -import org.apache.excalibur.xml.xslt.XSLTProcessorException; -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.component.ComponentException; import org.apache.avalon.framework.component.ComponentManager; -import org.apache.avalon.framework.component.Composable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.LogEnabled; -import org.apache.avalon.framework.parameters.Parameters; -import org.apache.cocoon.ProcessingException; -import org.apache.cocoon.caching.CacheableProcessingComponent; -import org.apache.cocoon.components.browser.Browser; -import org.apache.cocoon.components.deli.Deli; -import org.apache.cocoon.components.source.SourceUtil; -import org.apache.cocoon.environment.Cookie; +import org.apache.avalon.framework.component.ComponentException; import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Request; -import org.apache.cocoon.environment.Session; -import org.apache.cocoon.environment.SourceResolver; -import org.apache.cocoon.xml.XMLConsumer; -import org.apache.excalibur.source.Source; -import org.apache.excalibur.source.SourceException; -import org.apache.excalibur.source.SourceValidity; -import org.xml.sax.SAXException; - -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.sax.TransformerHandler; +import org.apache.cocoon.components.deli.Deli; -import java.io.IOException; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; import java.util.Map; -import java.util.Set; +import java.util.HashMap; /** * This Transformer is used to transform this incoming SAX stream using - * a XSLT stylesheet. Use the following sitemap declarations to define, configure - * and parameterize it: - * - * <b>In the map:sitemap/map:components/map:transformers:</b><br> - * <pre> - * <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"><br> - * <use-request-parameters>false</use-request-parameters> - * <use-browser-capabilities-db>false</use-browser-capabilities-db> - * <use-session-info>false</use-session-info> - * <transformer-factory>org.apache.xalan.processor.TransformerFactoryImpl</transformer-factory> - * </map:transformer> - * </pre> - * - * The <use-request-parameter> configuration forces the transformer to make all - * request parameters available in the XSLT stylesheet. Note that this might have issues - * concerning cachability of the generated output of this transformer.<br> - * This property is false by default. - * <p> - * The <use-browser-capabilities-db> configuration forces the transformer to make all - * properties from the browser capability database available in the XSLT stylesheetas. - * Note that this might have issues concerning cachability of the generated output of this - * transformer.<br> - * This property is false by default. - * <p> - * The <use-cookies> configuration forces the transformer to make all - * cookies from the request available in the XSLT stylesheetas. - * Note that this might have issues concerning cachability of the generated output of this - * transformer.<br> - * This property is false by default. - * <p> - * The <use-session-info> configuration forces the transformer to make all - * of the session information available in the XSLT stylesheetas.<br> - * These infos are (boolean values are "true" or "false" strings: session-is-new, - * session-id-from-cookie, session-id-from-url, session-valid, session-id.<br> - * This property is false by default. - * - * <p> The <use-deli> makes the DELI information available. - * If DELI component is configured in the cocoon.xconf, transformer will - * make all the properties from the CC/PP profile resolved from - * the request available in the XSLT stylesheets. CC/PP support is - * provided via the DELI library. If the request does not provide - * CC/PP information, then CC/PP information can added via the DELI - * legacy device database. - * - * <p>Note that these properties might introduces issues concerning - * cacheability of the generated output of this transformer.<br> - * - * - * The <transformer-factory> configuration allows to specify the TrAX transformer factory - * implementation that willbe used to obtain the XSLT processor. This allows to have - * several XSLT processors in the configuration - * (e.g. Xalan, XSTLC, Saxon, ...) and choose one or the other depending on the needs of stylesheet - * specificities.<br> - * If no factory is specified, this transformer will use the XSLT implementation - * that Cocoon uses internally. + * a XSLT stylesheet and have parameters available to the stylesheet + * augmented by the DELI CC/PP user-agent profile database * - * <p> - * <b>In a map:sitemap/map:pipelines/map:pipeline:</b><br> - * <pre> - * <map:transform type="xslt" src="stylesheets/yours.xsl"><br> - * <parameter name="myparam" value="myvalue"/> - * </map:transform> - * </pre> - * All <parameter> declarations will be made available in the XSLT stylesheet as - * xsl:variables. + * This transformer extends the default TraxTransformer and thus inherits + * all the properties and configuration parameters of that transformer. + * Please refer to its documentation for more information. * - * @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a> * @author <a href="mailto:[EMAIL PROTECTED]">Mark H. Butler</a> * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> * @version CVS $Id$ @@ -189,7 +97,7 @@ } } - private Map getLogicSheetParameters() { + protected Map getLogicSheetParameters() { Map map = super.getLogicSheetParameters(); if (this.deli != null) {