The XSLT Mediator applies a specified XSLT transformation to a selected element of the current message payload. The
source attribute specifies which element to be selected to apply the given XSLT transformation. In the case where the source element is not specified, it uses the first child of the soap body as the selected element. Optionally, parameters can be passed into the transformations through the
property elements. These properties are corresponding to the XSL parameters and can be accessed during transformation by
<xsl:param name="the name of the property"/>. The
feature element defines any features which should be explicitly set to the
The feature: http://ws.apache.org/ns/synapse/transform/feature/dom turns on DOM-based transformations instead of serializing elements into Byte streams and/or temporary files. Though this can be better in performance than using byte streams, sometimes it may not work for all transformations.
resource element can be used to resolve XSLT imports and includes from the repository. It works in exactly the same way as the corresponding element in a
<proxy> definition (Proxy Service).
The main elements and attributes:
TransformerFactory. The feature, http://ws.apache.org/ns/synapse/transform/feature/dom turns on DOM-based transformations instead of serializing elements into Byte streams and/or temporary files. Though this can be better in performance than using byte streams, sometimes it may not work for all transformations.
proxy> definition (Proxy Service).
You can click this link to add namespaces if you are providing an expression. You will be provided another panel named "Namespace Editor," where you can provide any number of namespace prefixes and URL that you have used in the XPath expression.
get-property(prop-name)XPath extension function).
You can configure the Mediator using XML. Click on "switch to source view" in the "Mediator" window.
In this example, the XSLT can be picked by the key
transform/example.xslt and the XSLT would be applied to a part of the message that is specified as an XPath expression. In this case, it is applied to
s11:Body/child the message.