title: How to get the first occurrence of value with the matching number from multiple sets
body: <p>I have request comes with multiple elements where I need the first occurrence of the where data_type=&quot;3&quot;. Hence there could be multiple values comes as 0,2,3,4 in random.</p>
  <p>When I tried to put the below Xpath function it's returning the all values where data_type='3'</p>
  <pre><code>&lt;xsl:value-of select=&quot;/process/TransactionType/data_xml/transaction/sub_documents/transactionLine[@data_type='3']/Ref&quot;/&gt;
  </code></pre>
  <p>Full input and output code click here  <a href="http://xsltransform.net/94Acsmc" rel="nofollow noreferrer">code snippet</a></p>
  <p>How I can get the one value instead all values.</p>
  <p>Please help me out here.</p>