title: how to set a new value to variable or param in xsl
body: <p>I need some help about xsl.  I have a date attribute in source xml and i need to know its previous value because i need categorized according to date. here is the  source xml.</p>
  
  <p>source xml:</p>
  
  <pre><code>&lt;root&gt;
    &lt;license id="a" expireDate="2010-02-01"/&gt;
    &lt;license id="b" expireDate="2010-02-01"/&gt;
    &lt;license id="c" expireDate="2010-02-01"/&gt;
    &lt;license id="d" expireDate="2010-02-04"/&gt;
    &lt;license id="e" expireDate="2010-02-04"/&gt;
    &lt;license id="f" expireDate="2010-02-12"/&gt;
    &lt;license id="g" expireDate="2010-02-12"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I need to transform this to </p>
  
  <pre><code>&lt;licenses&gt;
     &lt;expDate value="2010-02-01"&gt;
        &lt;license&gt;a&lt;/license&gt;
        &lt;license&gt;b&lt;/license&gt;
        &lt;license&gt;c&lt;/license&gt;
     &lt;/expDate&gt;
     &lt;expDate value="2010-02-04"&gt;
        &lt;license&gt;d&lt;/license&gt;
        &lt;license&gt;e&lt;/license&gt;
     &lt;/expDate&gt;
     &lt;expDate value="2010-02-12"&gt;
        &lt;license&gt;f&lt;/license&gt;
        &lt;license&gt;g&lt;/license&gt;
     &lt;/expDate&gt;
  &lt;/licenses&gt;
  </code></pre>
  
  <p>Actually, i can transform source xml which have different format from the given one. 
  I have read some articles but could not find the way to do this. How can I keep the previous date value and check if its different from current one.  </p>
  
  <p>Thanks</p>