# XSLT Mediator

The xslt mediator applies the specified XSLT transformation to the selected element of the current message payload. If the source element is not specified, it defaults to the first child of the soap body. Optionally parameters (XSLT) could be passed into the transformations through the 'property' field. The 'feature' field defines any features which should be explicitly set to the 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 would be better in performance than using byte streams, sometimes it may not work for all transformations. If XSLT script is importing any external resources, those resources can be defined in 'resources' section.

XSLT Mediator

- Key
  - Static : The registry key to refer the xslt.
  - Dynamic : The registry key will be dynamically generated by evaluating XPath
- Source: Specify in which part of message (specified in xpath) the xslt should be applied. Default is the SOAP body of the message.

## Properties of the XSLT mediator

Manage the properties which would be referred from the xslt in transformation (using get-property(prop-name) xpath extension function).

XSLT Mediator - Add Properties

- Property Name: Name of the property.
- Property Type: Whether it is a static value or an xpath expression.
- Value/ Expression: The static value or the xpath expression.
- NSEditor: Specify the namespaces that are used in the xpath expression.
- Action: Delete the property.

## Features of the XSLT mediator

Specify the features to be enabled in the XSLT transformation. Read the introduction paragraph of this guide for an example feature.

XSLT Mediator - Add Features

- Feature Name: Name of the feature.
- Feature Value: Specify whether the feature is turn on (True) or Not (False).
- Action: Delete the feature.

## Resources of the XSLT mediator

Specify the external resources which imported by XSLT script ( using xsl:import elements). Imported resources can be uploaded to registry and added to XSLT mediator.

XSLT Mediator - Add Resources

- Location: Value of xsl:import element in XSLT script
- Key : Registry location which imported resource stored (you can use registry browser to select registry resource)