xsl:template (mode)

To process content more than once.

  • Allows the same template rule to be used to produce different results.

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="*/@test">
        ...
      </xsl:template>
    
      <xsl:template match="*/@test" mode="test">
        ...
      </xsl:template>
    </xsl:stylesheet>