title: XSLT merging/concatenating values of siblings nodes of same name into single node
body: <p>Input xml</p>
  
  <pre><code>&lt;catalog&gt;
      &lt;product id="1"&gt;
          &lt;name&gt;abc&lt;/name&gt;
          &lt;category&gt;aaa&lt;/category&gt;
          &lt;category&gt;bbb&lt;/category&gt;
          &lt;category&gt;ccc&lt;/category&gt;
      &lt;/product&gt;
      &lt;product id="2"&gt;
          &lt;name&gt;cde&lt;/name&gt;
          &lt;category&gt;aaa&lt;/category&gt;
          &lt;category&gt;bbb&lt;/category&gt;
      &lt;/product&gt;
  &lt;/catalog&gt;
  </code></pre>
  
  <p>Expected Output xml</p>
  
  <pre><code>&lt;products&gt;
      &lt;product&gt;
          &lt;id&gt;1&lt;/id&gt;
          &lt;name&gt;abc&lt;/name&gt;
          &lt;category&gt;aaa,bbb,ccc&lt;/category&gt;
      &lt;/product&gt;
      &lt;product&gt;
          &lt;id&gt;2&lt;/id&gt;
          &lt;name&gt;cde&lt;/name&gt;
          &lt;category&gt;aaa,bbb&lt;/category&gt;
      &lt;/product&gt;
  &lt;/products&gt;
  </code></pre>
  
  <p>XSLT for transformation</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:output method="xml" indent="yes"/&gt;
      &lt;xsl:template match="/catalog"&gt;
          &lt;products&gt;
              &lt;xsl:for-each select="product"&gt;
                  &lt;product&gt;
                      &lt;id&gt;&lt;xsl:value-of select="@id"/&gt;&lt;/id&gt;
                      &lt;name&gt;&lt;xsl:value-of select="name"/&gt;&lt;/name&gt;
                      &lt;category&gt;&lt;xsl:value-of select="category" /&gt;&lt;/category&gt;
                  &lt;/product&gt;
              &lt;/xsl:for-each&gt;
          &lt;/products&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Actual Output xml :(</p>
  
  <pre><code>&lt;products&gt;
      &lt;product&gt;
          &lt;id&gt;1&lt;/id&gt;
          &lt;name&gt;abc&lt;/name&gt;
          &lt;category&gt;aaa&lt;/category&gt;
      &lt;/product&gt;
      &lt;product&gt;
          &lt;id&gt;2&lt;/id&gt;
          &lt;name&gt;cde&lt;/name&gt;
          &lt;category&gt;aaa&lt;/category&gt;
      &lt;/product&gt;
  &lt;/products&gt;
  </code></pre>
  
  <p>Code needed in looping through all sibling node by the name 'category' under every 'product' and merging/concatenating into single node separated by a comma. Number of 'category' varies for every product and hence the count is unknown.</p>