<xslTutorial creator="nicmila@idoox.com">
<index keywords='xsl:choose xsl:otherwise xsl:when'/>

<description>xsl:choose element is used for selection between several possibilities.
</description>

<xmlSource id="id1">
<SECTION>
<DATA>I need a pen.</DATA>
<DATA>I need some paper.</DATA>
<SUMMARY>I need a pen and some paper</SUMMARY>
</SECTION>
<SECTION>
<DATA>I need bread.</DATA>
<DATA>I need butter.</DATA>
</SECTION>

</xmlSource>

<attValues>
<value match="">
</value>
</attValues>


<xslStylesheet id="id2">
<xsl:template match="//SECTION">
<xsl:choose>
<xsl:when test='SUMMARY'>
<P><xsl:text>SUMMARY: </xsl:text>
<xsl:value-of select="SUMMARY"/></P>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="DATA">
<P><xsl:text>DATA: </xsl:text>
<xsl:value-of select="."/></P>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xslStylesheet>


</xslTutorial>