This example tests an attribute for a specified set of values:
<xsl:choose> <xsl:when test="@status='draft'> <p>This document is in draft status.</p> </xsl:when> <xsl:when test="@status='final-draft'> <p>This document is is ready for final review.</p> </xsl:when> <xsl:when test="@status='published'> <p>This document has been published as <xsl:value-of select="{@pub-id}"/></p> </xsl:when> <xsl:otherwise> <p>This document has no official status.</p> </xsl:otherwise> </xsl:choose>