title: XSL: Issue with tokenizing in the for loop
body: <p>I am using the following stylesheet for displaying a table in the excel workbook with the data. I am not able to get the desired result instead it is displaying as differently as given below.</p>
  
  <p>Suggestions Pls?</p>
  
  <p>The stylesheet used:</p>
  
  <pre><code>&lt;xsl:stylesheet&gt;
  &lt;xsl:template match="/"&gt;
      &lt;xsl:variable name="test1" select="str:tokenize('1$,$2$,$3$,$4$,$5','$,$')" /&gt;
      &lt;xsl:variable name="test2" select="str:tokenize('a$,$b$,$c$,$d$,$e','$,$')" /&gt;
      &lt;xsl:for-each select="str:split('1a$,$2b$,$3c$,$4d$,$5e','$,$')&gt;
          &lt;row&gt;
              &lt;cell Index="1"&gt;
                  &lt;xsl:value-of select="$test1[position()]" /&gt;
              &lt;/cell&gt;
              &lt;cell Index="2"&gt;
                  &lt;xsl:value-of select="$test2[position()]" /&gt;
              &lt;/cell&gt;
          &lt;/row&gt;
      &lt;/xsl:for-each&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p></p>
  
  <p>Expected Result:</p>
  
  <p>1 a</p>
  
  <p>2 b</p>
  
  <p>3 c</p>
  
  <p>4 d</p>
  
  <p>5 e</p>
  
  <p>Where as the result displayed as</p>
  
  <p>a b</p>
  
  <p>c d</p>
  
  <p>e</p>
  
  <p>It seems like the it is displaying the latest tokenize values.
  How to get respected values.</p>