XSLT Transformation

PIWI supports custom XSLT-Transformations. That means that it is possible to embed arbitrary XSLT-Transformations.


Example

Using the following XSLT-Stylesheet:

<xsl:template match="release">
  <div style="border: 1px solid #dcdcdc">
    <xsl:apply-templates />
  </div>
</xsl:template>

<xsl:template match="artist">
  <span style="font-size: 1.1em; color: #cc0000">
    <xsl:apply-templates />
  </span>
</xsl:template>

<xsl:template match="album">
  <span style="color: #0000cc">
    <xsl:apply-templates />
  </span>
</xsl:template>


Applied to the following XML-Document:

<release>
  <artist>Artist</artist>
  <album>Album</album>
</release>


Will result in the following output:

Artist Album