title: how to check whether the value of a string variable is Yes or No?
body: <p>How can I check whether the value of a string variable is Yes or No?</p>
  
  <pre><code>&lt;xsl:variable name="test1" select="DBE:OBJECT/DBE:ATTRIBUTE[@name='test1']/DBE:String"/&gt;
  &lt;xsl:variable name="test2" select="DBE:OBJECT/DBE:ATTRIBUTE[@name='test2']/DBE:String"/&gt;
  
  &lt;xsl:choose&gt;
  &lt;xsl:when test="$test1 = 'Yes'&gt;
      &lt;xsl:apply-templates select="YES"/&gt;
  &lt;/xsl:when&gt;
  &lt;xsl:when test="$test2 = 'Yes'&gt;
      &lt;xsl:apply-templates select="Invalid"/&gt;
  &lt;/xsl:when&gt;
  &lt;xsl:otherwise&gt;
       &lt;xsl:apply-templates select="DBE:OBJECT/DBE:ATTRIBUTE[@name='test3']/DBE:String"/&gt;
  &lt;/xsl:otherwise&gt;
  &lt;/xsl:choose&gt;
  </code></pre>
  
  <p>Please let me know what is wrong in the above.</p>