|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.xml.AbstractXMLProducer | +--org.apache.cocoon.xml.AbstractXMLPipe | +--org.apache.cocoon.transformation.AbstractTransformer | +--org.apache.cocoon.transformation.TraxTransformer
This Transformer is used to transform this incomming SAX stream using
a XSLT stylesheet. Use the following sitemap declarations to define, configure
and parameterize it:
In the map:sitemap/map:components/map:transformers:
<map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">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.
<use-request-parameters>false</use-request-parameters> <use-browser-capabilities-db>false</use-browser-capabilities-db> <use-session-info>false</use-session-info> <xslt-processor-role>org.apache.cocoon.components.xslt.XSLTProcessor</xslt-processor-role> </map:transformer>
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.
This property is false by default.
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.
This property is false by default.
The <use-session-info> configuration forces the transformer to make all
of the session information available in the XSLT stylesheetas.
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.
This property is false by default.
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.
Note that these properties might introduces issues concerning
cacheability of the generated output of this transformer.
The <xslt-processor> configuration allows to specify the XSLT processor that will be
used by its role name. This allows to have several XSLT processors in the configuration
(e.g. Xalan and Saxon) and choose one or the other depending on the needs of stylesheet
specificities.
This property defaults to "org.apache.cocoon.components.xslt.XSLTProcessor" which is the
standard role name for an XSLTProcessor.
In a map:sitemap/map:pipelines/map:pipeline:
<map:transform type="xslt" src="stylesheets/yours.xsl">All <parameter> declarations will be made available in the XSLT stylesheet as xsl:variables.
<parameter name="myparam" value="myvalue"/> </map:transform>
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
Constructor Summary | |
TraxTransformer()
|
Method Summary | |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
Set the current ComponentManager instance used by this
Composable . |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Configure this transformer. |
void |
dispose()
|
void |
endDocument()
Fix for stopping hanging threads of Xalan |
long |
generateKey()
Generate the unique key. |
CacheValidity |
generateValidity()
Generate the validity object. |
void |
recycle()
Recycle the producer by removing references |
void |
setConsumer(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters par)
Set the SourceResolver , the Map with
the object model, the source and sitemap
Parameters used to process the request. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
characters, comment, endCDATA, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, 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, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
Constructor Detail |
public TraxTransformer()
Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
public void compose(org.apache.avalon.framework.component.ComponentManager manager) throws org.apache.avalon.framework.component.ComponentException
ComponentManager
instance used by this
Composable
.compose
in interface org.apache.avalon.framework.component.Composable
public void setup(SourceResolver resolver, java.util.Map objectModel, java.lang.String src, org.apache.avalon.framework.parameters.Parameters par) throws org.xml.sax.SAXException, ProcessingException, java.io.IOException
SourceResolver
, the Map
with
the object model, the source and sitemap
Parameters
used to process the request.setup
in interface SitemapModelComponent
public long generateKey()
generateKey
in interface Cacheable
public CacheValidity generateValidity()
generateValidity
in interface Cacheable
null
if the
component is currently not cacheable.public void setConsumer(XMLConsumer consumer)
XMLConsumer
that will receive XML data.setConsumer
in interface XMLProducer
setConsumer
in class AbstractXMLProducer
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
public void recycle()
AbstractXMLProducer
recycle
in class AbstractXMLProducer
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class AbstractXMLPipe
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |