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 java.lang.String |
RESULT_BUILDER_FACTORY
The name of the attribute that allows to specify the
ResultBuilderFactory . |
static java.lang.String |
SOURCE_BUILDER_FACTORY
The name of the attribute that allows to specify the
SourceBuilderFactory . |
static java.lang.String |
STYLESHEET_PARSING_ACTIVITY |
static java.lang.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 java.lang.String |
USE_DOM_SOURCE_AND_RESULTS
The feature for which deciding switching between DOM and Stream during the
transformation process
|
static java.lang.String |
XSLT_TRANSFORMATION_ACTIVITY
Two template creation activities
|
log, trace, traceState
Constructor and Description |
---|
XSLTMediator() |
Modifier and Type | Method and Description |
---|---|
void |
addAllProperties(java.util.List<MediatorProperty> list) |
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an attribute to be set on the
TransformerFactory used by this mediator instance. |
void |
addFeature(java.lang.String featureName,
boolean isFeatureEnable)
Add a feature to be set on the
TransformerFactory used by this mediator instance. |
void |
addProperty(MediatorProperty p) |
java.util.List<MediatorProperty> |
getAttributes() |
java.util.List<MediatorProperty> |
getFeatures() |
java.util.List<MediatorProperty> |
getProperties() |
ResourceMap |
getResourceMap() |
SynapseXPath |
getSource() |
java.lang.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(java.lang.String sourceXPathString) |
void |
setTargetPropertyName(java.lang.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 java.lang.String USE_DOM_SOURCE_AND_RESULTS
public static final java.lang.String SOURCE_BUILDER_FACTORY
SourceBuilderFactory
.public static final java.lang.String RESULT_BUILDER_FACTORY
ResultBuilderFactory
.public static final java.lang.String TRANSFORM_XSLT_RESULT_DISABLE_BUILD
public static final java.lang.String XSLT_TRANSFORMATION_ACTIVITY
public static final java.lang.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(java.lang.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(java.lang.String name, java.lang.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 java.util.List<MediatorProperty> getFeatures()
public java.util.List<MediatorProperty> getAttributes()
public void addAllProperties(java.util.List<MediatorProperty> list)
public java.util.List<MediatorProperty> getProperties()
public void setSourceXPathString(java.lang.String sourceXPathString)
public java.lang.String getTargetPropertyName()
public void setTargetPropertyName(java.lang.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.