Written by
For umbraco versions:
AllReference
A quick overview of how to use XSLT in umbraco.
XSLT has some logic commands that useful to processing criteria based output. These commands are the "if" and "choose" commands.
The "if" command is useful for deciding to show content or not based on a single criteria. There is no "else" in XSLT, so, the if is somewhat limited.
<xsl:if test="@nodeName = 'example' ">
<!-- do this -->
</xsl:if>
The "choose" command is a bit more powerful in that it allows for multiple choices to be selected from.
<xsl:choose>
<xsl:when test="">
<!-- do this -->
</xsl:when>
<xsl:otherwise>
<!-- do this -->
</xsl:otherwise>
</xsl:choose>
In this example, you can have as many when statements as you like, but must have the otherwise statement.