public class XSLTMediator extends AbstractMediator
Additional properties passed into this mediator would become parameters for XSLT. Additional features passed into this mediator would become features except for "http://ws.apache.org/ns/synapse/transform/feature/dom" for the Transformer Factory, which is used to decide between using DOM and Streams during the transformation process. By default this is turned on as an optimization, but should be set to false if issues are detected
Note: Set the TransformerFactory system property to generate and use translets -Djavax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl
Modifier and Type | Field and Description |
---|---|
static String |
RESULT_BUILDER_FACTORY
The name of the attribute that allows to specify the
ResultBuilderFactory . |
static String |
SOURCE_BUILDER_FACTORY
The name of the attribute that allows to specify the
SourceBuilderFactory . |
static String |
STYLESHEET_PARSING_ACTIVITY |
static String |
TRANSFORM_XSLT_RESULT_DISABLE_BUILD
IF the user have set this property, the XSLTMediator does not build the result xml, instead it will be stored as
string property with name givent in "target" attribute
|
static String |
USE_DOM_SOURCE_AND_RESULTS
The feature for which deciding switching between DOM and Stream during the
transformation process
|
static String |
XSLT_TRANSFORMATION_ACTIVITY
Two template creation activities
|
log, trace, traceState
Constructor and Description |
---|
XSLTMediator() |
Modifier and Type | Method and Description |
---|---|
void |
addAllProperties(List<MediatorProperty> list) |
void |
addAttribute(String name,
String value)
Add an attribute to be set on the
TransformerFactory used by this mediator instance. |
void |
addFeature(String featureName,
boolean isFeatureEnable)
Add a feature to be set on the
TransformerFactory used by this mediator instance. |
void |
addProperty(MediatorProperty p) |
List<MediatorProperty> |
getAttributes() |
List<MediatorProperty> |
getFeatures() |
List<MediatorProperty> |
getProperties() |
ResourceMap |
getResourceMap() |
SynapseXPath |
getSource() |
String |
getTargetPropertyName() |
Value |
getXsltKey() |
boolean |
isContentAltering()
This is used to indicate whether message payload get modified during mediation
|
boolean |
isUseCache() |
boolean |
mediate(MessageContext synCtx)
Transforms this message (or its element specified as the source) using the
given XSLT transformation
|
void |
setResourceMap(ResourceMap resourceMap) |
void |
setSource(SynapseXPath source) |
void |
setSourceXPathString(String sourceXPathString) |
void |
setTargetPropertyName(String targetPropertyName) |
void |
setUseCache(boolean useCache) |
void |
setXsltKey(Value xsltKey) |
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
public static final String USE_DOM_SOURCE_AND_RESULTS
public static final String SOURCE_BUILDER_FACTORY
SourceBuilderFactory
.public static final String RESULT_BUILDER_FACTORY
ResultBuilderFactory
.public static final String TRANSFORM_XSLT_RESULT_DISABLE_BUILD
public static final String XSLT_TRANSFORMATION_ACTIVITY
public static final String STYLESHEET_PARSING_ACTIVITY
public boolean mediate(MessageContext synCtx)
synCtx
- the current message where the transformation will applypublic SynapseXPath getSource()
public void setSource(SynapseXPath source)
public Value getXsltKey()
public void setXsltKey(Value xsltKey)
public void addProperty(MediatorProperty p)
public void addFeature(String featureName, boolean isFeatureEnable)
TransformerFactory
used by this mediator instance.
This method can also be used to enable some Synapse specific optimizations and
enhancements as described in the documentation of this class.featureName
- The name of the featureisFeatureEnable
- the desired state of the featureTransformerFactory.setFeature(String, boolean)
,
XSLTMediator
public void addAttribute(String name, String value)
TransformerFactory
used by this mediator instance.
This method can also be used to enable some Synapse specific optimizations and
enhancements as described in the documentation of this class.name
- The name of the featurevalue
- should this feature enable?TransformerFactory.setAttribute(String, Object)
,
XSLTMediator
public List<MediatorProperty> getFeatures()
public List<MediatorProperty> getAttributes()
public void addAllProperties(List<MediatorProperty> list)
public List<MediatorProperty> getProperties()
public void setSourceXPathString(String sourceXPathString)
public String getTargetPropertyName()
public void setTargetPropertyName(String targetPropertyName)
public ResourceMap getResourceMap()
public void setResourceMap(ResourceMap resourceMap)
public boolean isContentAltering()
Mediator
isContentAltering
in interface Mediator
isContentAltering
in class AbstractMediator
public boolean isUseCache()
public void setUseCache(boolean useCache)
Copyright © 2005–2020 Apache Software Foundation. All rights reserved.