title: XSLT: contains() for multiple strings
body: <p>I have a variable in XSLT called <code>variable_name</code> which I am trying to set to <code>1</code>, if the Product in question has attributes with name A or B or both A &amp; B.</p>
  
  <pre><code>&lt;xsl:variable name="variable_name"&gt;
    &lt;xsl:for-each select="product/attributes"&gt;
      &lt;xsl:if test="@attributename='A' or @attributename='B'"&gt;
        &lt;xsl:value-of select="1"/&gt;
      &lt;/xsl:if&gt;
    &lt;/xsl:for-each&gt;
  &lt;/xsl:variable&gt;
  </code></pre>
  
  <p>Is there any way to match multiple strings using the if statement, as mine just matches if A is present or B is present. If both A &amp; B are present, it does not set the variable to 1. Any help on this would be appreciated as I am a newbie in XSLT.</p>