title: Concat several nodes xsl
body: <p>My XML:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Result&gt;
     &lt;Answer questionId="Servicios"&gt;Auditoría|Asesoría en Impuestos|&lt;/Answer&gt;
     &lt;Answer questionId="Servicios"&gt;Auditoría|Outsourcing|Asesoría en RRHH|&lt;/Answer&gt;
  &lt;/Result&gt;
  </code></pre>
  
  <p>I want to concat each <code>node()</code> into a UNIQUE variable (<code>&lt;xsl:variable name = "var"/&gt;</code> for example) using <code>xsl:for-each</code> or something like that, then count the "|" char using this:</p>
  
  <pre><code>&lt;xsl:variable name="total" select="string-length(string($var))-string-length(translate(string($var),'|',''))"/&gt;
  </code></pre>
  
  <p>If i do this:</p>
  
  <pre><code>    &lt;xsl:value-of select ="//Result/Answer[@questionId = 'Servicios']//text()"/&gt;
  &lt;!--The return is something like an array--&gt;
  &lt;!--[1]Auditoría|Asesoría en Impuestos|--&gt;
  &lt;!--[2]Auditoría|Outsourcing|Asesoría en RRHH|--&gt;
  &lt;!--and the result is '2' it only select the [1] and i need all of them, [1] and [2] in this case--&gt;
  </code></pre>
  
  <p>I think i must concatenate all the values with <code>xsl:for-each</code></p>
  
  <p>im using xslt <code>version="1.0"</code> </p>
  
  <p>I would appreciate any help!
  Thanks!</p>