title: Looping over distinct values
body: <p>Given a variable which returns a list of distinct States using the distinct-values() function, is there a way to tokenize the variable in a for-each loop?</p>
  
  <pre><code>&lt;States&gt;
  &lt;State&gt;AL&lt;/State&gt;
  &lt;State&gt;AL&lt;/State&gt;
  &lt;State&gt;NM&lt;/State&gt;
  &lt;/States&gt;
  </code></pre>
  
  <p>The following variable returns AL and NM, but I can't iterate over it using for-each.  Is there a way around this?</p>
  
  <pre><code>&lt;xsl:variable name="FormStates" select="distinct-values(States/State)"/&gt;
    &lt;xsl:for-each select="$FormStates"&gt;
  </code></pre>
  
  <p>XSLT 2.0 ok.</p>