<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sphurthi Edara</title>
    <description>The latest articles on DEV Community by sphurthi Edara (@sphurthi_edara).</description>
    <link>https://dev.to/sphurthi_edara</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3926158%2F4b39376b-4a65-491c-9f50-0f874971f7a3.png</url>
      <title>DEV Community: sphurthi Edara</title>
      <link>https://dev.to/sphurthi_edara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sphurthi_edara"/>
    <language>en</language>
    <item>
      <title>Fixing XSLT Import Issues in MuleSoft (Works in Local but Fails in RTF Runtime)</title>
      <dc:creator>sphurthi Edara</dc:creator>
      <pubDate>Tue, 12 May 2026 03:16:49 +0000</pubDate>
      <link>https://dev.to/sphurthi_edara/fixing-xslt-import-issues-in-mulesoft-works-in-local-but-fails-in-rtf-runtime-3bi0</link>
      <guid>https://dev.to/sphurthi_edara/fixing-xslt-import-issues-in-mulesoft-works-in-local-but-fails-in-rtf-runtime-3bi0</guid>
      <description>&lt;p&gt;Fixing XSLT Import Issues in MuleSoft&lt;br&gt;
(Works in Local but Fails in RTF Runtime)&lt;/p&gt;

&lt;p&gt;Introduction&lt;br&gt;
XSLT (Extensible Stylesheet Language Transformations) is used to transform XML data from one format into another during application integrations.&lt;br&gt;
While working on a MuleSoft integration project, I faced a challenging issue where the XSLT transformation worked perfectly in Anypoint Studio (local environment) but failed after deployment to Runtime Fabric (RTF).&lt;br&gt;
After trying multiple approaches and finding very limited documentation for this issue, I was able to identify the root cause and implement a working solution. In this article, I will explain the issue, failed approaches, and the final solution that resolved it successfully.&lt;/p&gt;



&lt;p&gt;🔹 Scenario&lt;br&gt;
I had:&lt;br&gt;
• A parent XSLT file &lt;br&gt;
• One or more child XSL files &lt;br&gt;
• Requirement: Import child XSL inside the parent and perform transformation&lt;/p&gt;

&lt;p&gt;🔹 Local Setup vs Runtime Issue&lt;br&gt;
• Both the parent and child XSL files were stored under: &lt;br&gt;
               src/main/resources/xslt/&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9r3bs2f6v3j6u03y7ncw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9r3bs2f6v3j6u03y7ncw.png" alt=" " width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the General section, I used:&lt;br&gt;
• Content → Passed the payload to be transformed &lt;br&gt;
• XSLT → Referenced the parent XSL file using:&lt;br&gt;
${file::xslt/parent.xsl}&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jlvkx76zzo7kxmamdi1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jlvkx76zzo7kxmamdi1.png" alt=" " width="800" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Inside the parent XSL, I imported the child XSL using: &lt;br&gt;
               &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdrc3bys71ijpeg2soby.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdrc3bys71ijpeg2soby.png" alt=" " width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📸 (Refer to the screenshot above for the exact configuration)&lt;/p&gt;

&lt;p&gt;👉 With this setup, the transformation worked perfectly in the local environment (Anypoint Studio).&lt;/p&gt;

&lt;p&gt;🔴 Issue in Runtime Fabric (RTF)&lt;/p&gt;

&lt;p&gt;However, when the same application was deployed to the RTF (Runtime Fabric) environment, the transformation failed with the following error: &lt;/p&gt;

&lt;p&gt;[2026-04-21 17:50:36.966] ERROR DefaultExceptionListener [[MuleRuntime].uber.03: [test].test.CPU_INTENSIVE @65f712f4] [event: ]: &lt;/p&gt;



&lt;p&gt;Message               : I/O error reported by XML parser processing file:/apps/test/xslt/xsl/child.xsl: /apps/test/xslt/xsl/child.xsl (No such file or directory)&lt;/p&gt;

&lt;p&gt;💡 Why This Happens&lt;/p&gt;

&lt;p&gt;In Anypoint Studio (local):&lt;br&gt;
• Mule can resolve ${file::} paths directly from the filesystem &lt;/p&gt;

&lt;p&gt;In RTF (runtime):&lt;br&gt;
• Resources are packaged inside the application JAR &lt;br&gt;
• Mule uses classpath-based resolution, not filesystem paths &lt;/p&gt;

&lt;p&gt;👉 That’s why the child XSL cannot be found in runtime&lt;/p&gt;

&lt;p&gt;🔴 Failed Approaches&lt;br&gt;
I tried multiple approaches, but none worked:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Using classpath inside parent XSL&lt;br&gt;
 &lt;br&gt;
❌ Error:&lt;/p&gt;



&lt;p&gt;Message               : I/O error reported by XML parser processing classpath:/xslt.xsl/child.xsl: unknown protocol: classpath&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using relative path&lt;br&gt;
 &lt;br&gt;
❌ Error:&lt;/p&gt;



&lt;p&gt;Message               : I/O error reported by XML parser processing file:/tmp/child.xsl: /tmp/child.xsl (No such file or directory)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using absolute path&lt;br&gt;
&lt;br&gt;
*Both child and parent xsl are in same xslt folder unser src/main/resoucrces.&lt;br&gt;
❌ Error:&lt;/p&gt;



&lt;p&gt;Message               : I/O error reported by XML parser processing file:/xslt/child.xsl: /xslt/child.xsl (No such file or directory)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✅ Final Working Solution&lt;br&gt;
The solution was a combination of correct XSLT reference + classpath usage + dependency alignment.&lt;br&gt;
✔ Step 1: Change how parent XSL is referenced&lt;br&gt;
Instead of using ${file::...}, declare XSL directly in the XSLT component:&lt;br&gt;
&lt;a&gt;xml-module:xslt&lt;/a&gt;&lt;br&gt;
  &amp;lt;![CDATA[]]&amp;gt;&lt;br&gt;
&lt;a href="/xml-module:xslt"&gt;/xml-module:xslt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltr1qmmfmnm60vzqybyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltr1qmmfmnm60vzqybyg.png" alt=" " width="800" height="109"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✔ Step 2: Use classpath inside parent XSL&lt;br&gt;
&lt;br&gt;
👉 This ensures Mule runtime correctly resolves resources from the classpath.&lt;/p&gt;

&lt;p&gt;✔ Step 3: Ensure correct folder structure&lt;br&gt;
src/main/resources/xslt/&lt;br&gt;
    └── child.xsl&lt;/p&gt;

&lt;p&gt;✔ Step 4: Match Mule XML Module dependency with runtime&lt;br&gt;
&lt;br&gt;
    org.mule.modules&lt;br&gt;
    mule-xml-module&lt;br&gt;
    1.4.3&lt;br&gt;
    mule-plugin&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;👉 Important: Dependency version must align with your Mule runtime.&lt;br&gt;
• Runtime used: 4.10.2 &lt;br&gt;
• Module version: 1.4.3&lt;/p&gt;

&lt;p&gt;💡 Bonus Insight&lt;br&gt;
This solution also works when:&lt;br&gt;
• You have multiple child XSL files &lt;br&gt;
• Complex transformations with nested imports &lt;br&gt;
I tested this with multiple child XSLs, and it worked consistently in both:&lt;br&gt;
• Local (Studio) &lt;br&gt;
• RTF Runtime&lt;/p&gt;

&lt;p&gt;🔹 Conclusion&lt;br&gt;
This issue is not well documented, and it can be frustrating when something works locally but fails in runtime.&lt;br&gt;
• By correctly using classpath-based imports and aligning dependencies, you can ensure consistent XSLT execution across environments.&lt;br&gt;
• I hope this helps anyone facing similar issues and saves valuable debugging time.&lt;/p&gt;

&lt;p&gt;✍️ Author&lt;br&gt;
Sphurthi Edara&lt;br&gt;
MuleSoft Developer&lt;br&gt;
Connect with me on LinkedIn:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/sphurthi-edara/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/sphurthi-edara/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mulesoft</category>
      <category>xslt</category>
      <category>runtimefabric</category>
      <category>xslttranformation</category>
    </item>
  </channel>
</rss>
