title: Using EXSLT str:tokenize to split a string into separate words
body: <p>I am tokenizing a string into space separated words</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"&gt;
  &lt;xsl:include href="str.tokenize.xsl"/&gt;
  &lt;xsl:template match="/string/upara"&gt;
      &lt;root&gt;
          &lt;xsl:for-each select="str:tokenize(.,'&amp;#xA;')"&gt;
              &lt;row&gt;
                  &lt;xsl:for-each select="str:tokenize(.,',')"&gt;
                      &lt;elem&gt;&lt;xsl:value-of select="."/&gt;&lt;/elem&gt;
                  &lt;/xsl:for-each&gt;
              &lt;/row&gt;
          &lt;/xsl:for-each&gt;
      &lt;/root&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p></p>
  
  <p>It always stops at str:tokenize()  function in first line. What is the problem? I am using <em>Altova XML Spy</em>.  </p>
  
  <p>Desired behavior:</p>
  
  <pre><code>Input:This is a small string
  Output: 4 2 1 5 6
  </code></pre>
  
  <p>Output length of each individual word</p>