Contact Free trial Login

XSLT Transformer Reference

MuleSoft recommends against deployments to Mule 3.8. Standard Support for this version ended on November 16, 2018, and Mule 3.8 will reach its End of Life on November 16, 2021, when Extended Support ends.


You can use the XSLT Transformer to transform XML data using XSLT.

A XSLT transformer, unless configured otherwise, transforms XML data based on the default XSL template file.

General Tab

Use the General tab to specify the return class, encoding, MIME type, and XSL transformation file.

For the XSL template file, you can browse to this file or enter the full path to the file.


Advanced Tab

Use the Advanced tab to optionally configure additional properties.


Transformer Pool: You can set Max Idle and Max Active values for the transformers pool. Because XSL transformation is expensive, and because Mule pools transformers for better throughput, you may want to set limits on the transformer pool when using XSLT transformers. Use Max Idle to set the maximum number of transformer instances that remain idle in the pool. Use Max Active to set the maximum number of XSLT transformers that are pooled at any given time. The default value for Max Idle is 2 and the default value for Max Active is 5.

URI Resolver: Change how the XSL output is validated. If not set, Mule uses a default resolver that checks for resources on the local file system and classpath.

Transformer Factory: If set, this is the fully qualified class name of the javax.xml.TransformerFactory instance to use. If not specified, Mule uses the default JDK factory TransformerFactory.newInstance().

Content Properties: Click the green plus icon plus to add a key. This example shows the title and rating for a CD music listing service, which is listed in the code example in the next section.

Code Example

xslt transformer ref flow

The following code example shows using XSLT to process music CD listings.

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http=""
    <http:listener-config name="HTTP_Listener_Configuration" host="localhost"
    port="8081" doc:name="HTTP Listener Configuration"/>
    <flow name="xsltFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <mulexml:xslt-transformer name="xslt" xslFile="./conf/xsl/cd-listing.xsl">
            <mulexml:context-property key="title" value="#[header:ListTitle]"/>
            <mulexml:context-property key="rating" value="#[header:ListRating]"/>

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub