title: How to compare the value of two nodes in XSLT
body: <p>I am new to XSLT. I need help comparing the value of two nodes' values in XML.</p>
  
  <p>My sample XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;G1Export xmlns=""&gt;
      &lt;AgencyGroup xmlns=""&gt;
          &lt;Agency xmlns=""&gt;
              &lt;RecordType xmlns=""&gt;RecordType&lt;/RecordType&gt;
              &lt;OrgId xmlns=""&gt;123&lt;/OrgId&gt;
          &lt;/Agency&gt;
      &lt;/AgencyGroup&gt;
      &lt;BranchGroup xmlns=""&gt;
          &lt;BranchCode xmlns=""&gt;
              &lt;OrgId xmlns=""&gt;123&lt;/OrgId&gt;
          &lt;/BranchCode&gt;
      &lt;/BranchGroup&gt;
  &lt;/G1Export&gt;
  </code></pre>
  
  <p>In the above XML file I need to compare the values of the <code>OrgId</code> node under the <code>&lt;AgencyGroup&gt;</code> node to the one under the <code>&lt;BranchGroup&gt;</code> node.</p>
  
  <p>I tried to used the <code>compare()</code> method, but it gives me the reult of 1.
  The actual result must be 0 (for equal). I am using XSLT 2.</p>