title: xquery - function tokenize for regular expression
body: <p>I have modified my code with regular expression but I have problems with <code>fn:tokenize</code>. This is a bit part of my xml file:</p>
  
  <pre><code>&lt;radix&gt;
  ...
  &lt;EV&gt;
    &lt;accoppiamenti&gt;
       &lt;accoppiamento specie="e01" /&gt;
    &lt;/accoppiamenti&gt;
  &lt;/EV&gt;
    &lt;accoppiamenti&gt;
       &lt;accoppiamento specie="e00" /&gt;
       &lt;accoppiamento specie="e01" /&gt;
       &lt;accoppiamento specie="e02" /&gt;
    &lt;/accoppiamenti&gt;
  &lt;/EV&gt;
  ...
  &lt;/radix&gt;
  </code></pre>
  
  <p>This is the part of my file xquery with tokenize:</p>
  
  <pre><code>for $ev in $snapshot/EV
  let $stringa := $ev/accoppiamenti//accoppiamento/@specie
  return(
      fn:tokenize($stringa,"e")        
  )
  </code></pre>
  
  <p>The expected output is <code>01 00 01 02</code> but the effective output is <code>0100</code> (without space).
  What's the trouble? Thanks at all for the helps.</p>