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 |
USE_DOM_SOURCE_AND_RESULTS
The feature for which deciding switching between DOM and Stream during the
transformation process
|
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 |
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 |
setXsltKey(Value xsltKey) |
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isContentAware, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
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 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)
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.