Logo

Free Online XSL Transformer

Use this free online XML Transformer to apply an XSL stylesheet to your XML document and generate the transformed result. Add your XML and XSL by pasting them into the editors or uploading the files from your device. Select your preferred indentation style to control how the transformed XML is displayed.

After the transformation is complete, you can copy or download the transformed XML. If your XML or XSL contains errors, check them with our XML Validator before running the transformation, or use our XML Formatter to organize your XML into a cleaner structure.

XML and XSL

Transformation Results

XSLT Transformation Example

XML File

<?xml version="1.0" encoding="UTF-8"?>
<movies>
    <movie>
        <title>Inception</title>
        <director>Christopher Nolan</director>
        <genre>Sci-Fi</genre>
        <year>2010</year>
        <rating>8.8</rating>
    </movie>
    <movie>
        <title>Parasite</title>
        <director>Bong Joon-ho</director>
        <genre>Thriller</genre>
        <year>2019</year>
        <rating>8.5</rating>
    </movie>
    <movie>
        <title>Interstellar</title>
        <director>Christopher Nolan</director>
        <genre>Adventure</genre>
        <year>2014</year>
        <rating>8.7</rating>
    </movie>
</movies>

XSL File

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<body>
<h2>Movie Library</h2>
<table border="1">
<tr>
<th>Title</th>
<th>Director</th>
<th>Genre</th>
<th>Year</th>
<th>Rating</th>
</tr>

<xsl:for-each select="movies/movie">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="director"/></td>
<td><xsl:value-of select="genre"/></td>
<td><xsl:value-of select="year"/></td>
<td><xsl:value-of select="rating"/></td>
</tr>
</xsl:for-each>

</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

Transformed Document

<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
   </head>
   <body>
      <h2>Movie Library</h2>
      <table border="1">
         <tbody>
            <tr>
               <th>Title</th>
               <th>Director</th>
               <th>Genre</th>
               <th>Year</th>
               <th>Rating</th>
            </tr>
            <tr>
               <td>Inception</td>
               <td>Christopher Nolan</td>
               <td>Sci-Fi</td>
               <td>2010</td>
               <td>8.8</td>
            </tr>
            <tr>
               <td>Parasite</td>
               <td>Bong Joon-ho</td>
               <td>Thriller</td>
               <td>2019</td>
               <td>8.5</td>
            </tr>
            <tr>
               <td>Interstellar</td>
               <td>Christopher Nolan</td>
               <td>Adventure</td>
               <td>2014</td>
               <td>8.7</td>
            </tr>
         </tbody>
      </table>
   </body>
</html>

Related Tools