This project has retired. For details please refer to its
Attic page .
XSLTAspect (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.portal.layout.renderer.aspect.impl
Class XSLTAspect
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
org.apache.cocoon.portal.layout.renderer.aspect.impl.XSLTAspect
All Implemented Interfaces: Disposable , Component , Configurable , LogEnabled , Serviceable , ThreadSafe , RendererAspect
public class XSLTAspect extends AbstractAspect implements Disposable , Configurable
Apply a XSLT stylesheet to the contained layout. All following renderer aspects
are applied first before the XML is fed into the XSLT. All configuration and layout
parameters are made available to the stylesheet.
Example XML:
<-- result from output of following renderers transformed by stylesheet -->
The parameter values may contain Strings and/or references to input modules which will be resolved each
time the aspect is rendered.
Applicable to:
Layout
Configuration
cocoon.xconf
<aspect name="xslt" class="org.apache.cocoon.portal.layout.renderer.aspect.impl.XSLTAspect">
<parameters>
<parameter name="name1 " value="parameter value "/>
<parameter name="name2 " value="parameter value "/>
<parameter>
</aspect>
Parameters
style req String null
xslt-processor-role req String null
Version:
CVS $Id: XSLTAspect.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler , Volker Schmitt
Fields inherited from interface org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect
ROLE
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
variables
protected List variables
parameters
protected Parameters parameters
variableFactory
protected VariableResolverFactory variableFactory
XSLTAspect
public XSLTAspect ()
service
public void service (ServiceManager manager)
throws ServiceException
Specified by: service
in interface Serviceable
Overrides: service
in class AbstractAspect
Throws:
ServiceException
configure
public void configure (Configuration config)
throws ConfigurationException
Specified by: configure
in interface Configurable
Throws:
ConfigurationException
toSAX
public void toSAX (RendererAspectContext context,
Layout layout,
PortalService service,
ContentHandler handler)
throws SAXException
Description copied from interface: RendererAspect
Stream out raw layout
Specified by: toSAX
in interface RendererAspect
Overrides: toSAX
in class AbstractAspect
Throws:
SAXException
getStylesheetURI
protected String getStylesheetURI (XSLTAspect.PreparedConfiguration config,
Layout layout)
throws SAXException
Throws:
SAXException
getParameterValue
protected String getParameterValue (Map.Entry entry)
throws SAXException
Throws:
SAXException
prepareConfiguration
public Object prepareConfiguration (Parameters configuration)
throws ParameterException
Description copied from interface: RendererAspect
Compile the configuration.
A renderer aspect can "compile" the configuration in
order to increase performance.
If the renderer does not want to compile it should
simply return the configuration.
The "compiled" configuration is passed to the
RendererAspect.getAspectDescriptions(Object)
method and
is available during streaming via the context object.
This method can also be used for validation the configuration.
Specified by: prepareConfiguration
in interface RendererAspect
Overrides: prepareConfiguration
in class AbstractAspect
Throws:
ParameterException
dispose
public void dispose ()
Specified by: dispose
in interface Disposable
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.