title: Iterate over nodes containing CDATA and concatenate them and how to retrieve specific data of the concatenate data
body: <p>I'm new to XSLT and need to solve a nasty problem and I've no change to solve it.
  The following example describes my problem:</p>
  
  <pre><code>&lt;a&gt;
    &lt;b1&gt;&lt;![CDATA[&lt;CdtrRefInf&gt;&lt;Issr&gt;XXX&lt;/Issr&gt;&lt;/Tp&gt;&lt;Ref&gt;123456123]]&gt;&lt;/b1&gt;
    &lt;b2&gt;&lt;![CDATA[193&lt;/Ref&gt;&lt;/CdtrRefInf&gt;]]&gt;&lt;/b2&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>The expected oucome should be:</p>
  
  <pre><code>&lt;a&gt;
    &lt;b1&gt;123456123193&lt;b1&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>I need to iterate over the elements b1 and b2 and concatenate the content into a variable. Then I need to take the content of the Ref element and put this in the b1 element.
  The following code concatenate the content of the fields b1 and b2 together.
  But how to put it in the above format?????
      
      </p>
  
  <pre><code>&lt;xsl:template match="/*"&gt;
      &lt;xsl:variable name="vMyVars"&gt;
          &lt;xsl:apply-templates select="b1 | b2 " mode="vMyVars"/&gt;
      &lt;/xsl:variable&gt;
      &lt;xsl:value-of select="substring($vMyVars, -1, string-length($vMyVars))"/&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="*" mode="vMyVars"/&gt;
  
  &lt;xsl:template match="*[normalize-space()]" mode="vMyVars"&gt;
      &lt;xsl:value-of select="."/&gt;
      &lt;!--&lt;xsl:text&gt;, &lt;/xsl:text&gt;--&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any advise is welcome.
  Regards Dirk</p>