title: Axis step child::element('':PRODUCT_LIST) cannot be used here: the context item is an atomic value
body: <p>Thanks in advance for your support.</p>
  
  <p>I have the following xml and xslt</p>
  
  <pre><code>&lt;SUBSCRIBER&gt;
      &lt;PRODUCT_LIST&gt;
          &lt;PRODUCT_INFO&gt;
              &lt;ID&gt;BA3&lt;/ID&gt;
              &lt;PRODUCT_TYPE&gt;Chargeable Bonus Product&lt;/PRODUCT_TYPE&gt;
              &lt;NSN1&gt;34178&lt;/NSN1&gt;
              &lt;NSN2&gt;2015-02-18 23:59:59&lt;/NSN2&gt;
              &lt;OFFER&gt;1104&lt;/OFFER&gt;
              &lt;DA_UNIT&gt;time&lt;/DA_UNIT&gt;
              &lt;UA&gt;1003&lt;/UA&gt;
          &lt;/PRODUCT_INFO&gt;
          &lt;PRODUCT_INFO&gt;
              &lt;ID&gt;SID15&lt;/ID&gt;
              &lt;PRODUCT_TYPE&gt;Rate Cutter&lt;/PRODUCT_TYPE&gt;
              &lt;NSN1&gt;2015-12-23&lt;/NSN1&gt;
              &lt;OFFER&gt;1215&lt;/OFFER&gt;
          &lt;/PRODUCT_INFO&gt;
          &lt;PRODUCT_INFO&gt;
              &lt;ID&gt;UseRs325GetRs25&lt;/ID&gt;
              &lt;PRODUCT_TYPE&gt;Usage Subscription- Traffic&lt;/PRODUCT_TYPE&gt;
              &lt;NSN1&gt;0&lt;/NSN1&gt;
              &lt;NSN2&gt;2015-02-15&lt;/NSN2&gt;
              &lt;NSN3&gt;2015-02-05&lt;/NSN3&gt;
              &lt;NSN4&gt;2015-02-15 14:01:33&lt;/NSN4&gt;
              &lt;OFFER&gt;1250&lt;/OFFER&gt;
              &lt;UA&gt;1095&lt;/UA&gt;
              &lt;UA2&gt;1096&lt;/UA2&gt;
              &lt;THRESHOLD&gt;325&lt;/THRESHOLD&gt;
              &lt;UA_INTERVAL&gt;10&lt;/UA_INTERVAL&gt;
          &lt;/PRODUCT_INFO&gt;
      &lt;/PRODUCT_LIST&gt;
  &lt;/SUBSCRIBER&gt;
  </code></pre>
  
  <p>XSLT:</p>
  
  <pre><code>&lt;xsl:template match="SUBSCRIBER"&gt;
  
      &lt;xsl:variable name="PRODUCT_TYPE" select="PRODUCT_LIST/PRODUCT_INFO[(PRODUCT_TYPE eq 'Chargeable Bonus Product') or (PRODUCT_TYPE eq 'Home Zone') or (PRODUCT_TYPE eq 'Usage Subscription- Traffic') or (PRODUCT_TYPE eq 'Telescopic Charging') or (PRODUCT_TYPE eq 'Usage Subscription- Recharge')]/PRODUCT_TYPE"/&gt;
      &lt;xsl:for-each select="1 to count($PRODUCT_TYPE)"&gt;
          &lt;xsl:variable name="index" select="."/&gt;
          &lt;xsl:variable name="product_name" select="$PRODUCT_TYPE[$index]"/&gt;
          &lt;xsl:value-of select="PRODUCT_LIST/PRODUCT_INFO[(PRODUCT_TYPE eq $product_name)]/UA"/&gt;
      &lt;/xsl:for-each&gt;
  
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>I am getting the following exception,</p>
  
  <p>Description: Axis step child::element('':PRODUCT_LIST) cannot be used here: the context item is an atomic value</p>
  
  <p>Please advise the fix.</p>