<xslt>

XSLT transformation processor

Core v2.2.0

Overview

The processor applies XSLT transformations to XML content. Supports XSLT 1.0 and 2.0 for complex XML transformations.

Usage Examples

Example 1: Transform XML to HTML

example-1.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<def var="html">
  <xslt>
    <stylesheet>
      <![CDATA[
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="/products">
          <html>
            <body>
              <xsl:for-each select="product">
                <p><xsl:value-of select="name"/></p>
              </xsl:for-each>
            </body>
          </html>
        </xsl:template>
      </xsl:stylesheet>
      ]]>
    </stylesheet>
    <xml>${productXml}</xml>
  </xslt>
</def>
</config>

Example 2: XML to JSON-like structure

example-2.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<xslt>
  <stylesheet>
    <file path="transform.xsl" action="read"/>
  </stylesheet>
  <xml>${xmlData}</xml>
</xslt>
</config>

Important Notes