title: Test if parameter is one of several values in XSLT
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1007018/xslt-expression-to-check-if-variable-belongs-to-set-of-elements">XSLT expression to check if variable belongs to set of elements</a>  </p>
  </blockquote>
  
  
  
  <p>Given a parameter, <code>$name</code>, what is a short and clean way to check if its value is equal to one of a finite number of values?</p>
  
  <p>For example, say I wanted to merge the first 3 of these <code>when</code> tests because their contents were exactly the same.</p>
  
  <pre><code>&lt;choose&gt;
    &lt;when test="$name='Alice'"&gt;
    &lt;when test="$name='Bob'"&gt;
    &lt;when test="$name='Cindy'"&gt;
    &lt;when test="$name='Dave'"&gt;
    &lt;otherwise&gt;
  </code></pre>
  
  <p>Something like <code>test="$name in ['Alice','Bob','Cindy']"</code>, except actually valid :P</p>