title: XSLT: If Node = A then set B=1 Else B=2
body: <p>I am looping thru looking at the values of a Node.  </p>
  
  <pre><code>If Node = B, then B has one of two possible meanings. 
    --If Node = A has been previously found in the file, then the value for A
      should be sent as 1.
    --If Node = A has NOT been found in the file, the the value for A should 
      be sent as 2.
  
  where file is the xml source to be transformed
  </code></pre>
  
  <p>I cannot figure out how to do this.  If I was using a programming language that allowed for a variable to have its value reassigned/changed, then it is easy.  But, with XSLT variables are set once.</p>