title: Implementing Key Value Concept in XSLT
body: <p>I am working on XSLT, where I need to implement something as follows.
  My Source XML sample looks like this.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
      &lt;catalog&gt;
          &lt;cd&gt;
              &lt;title&gt;A&lt;/title&gt;  
              &lt;title&gt;B&lt;/title&gt;
              &lt;title&gt;C&lt;/title&gt;  
          &lt;/cd&gt;
      &lt;/catalog&gt;
  </code></pre>
  
  <p>Consider there is some key value pair list is there.</p>
  
  <pre><code>    Key         Value
      A           Algebra
      B           Biology
      C           Chemistry
      D           Data Analysis
      ---         ---
  
      ----        ---
  </code></pre>
  
  <p>I need to write an xslt such that for every occurance of key 'A', need to replace with appropriate value.</p>
  
  <p>I also need to mention the list of Key value pairs in the same XSLT.
   Sample Output:</p>
  
  <pre><code>&lt;Data&gt;
      &lt;Subject&gt;Algebra&lt;/Subject&gt;
      &lt;Subject&gt;Biology&lt;/Subject&gt;
      &lt;Subject&gt;Chemistry&lt;/Subject&gt;
   &lt;/Data&gt;
  </code></pre>
  
  <p>Can any one help me out how to do it.</p>
  
  <p>Thank you.</p>