title: xslt template - Changing Cells Per Row in a Grid
body: <p>I am not at all familiar with xsl, can you please help me.  The following code results in 3-cell rows, forming a grid.  </p>
  
  <pre><code>&lt;xsl:template match="Entity"&gt;
      &lt;xsl:if test="position() mod 3 = 1"&gt;
        &lt;div class="row"&gt;
          &lt;xsl:for-each select=". | following-sibling::*[position() &amp;lt; 3]"&gt;
            &lt;xsl:call-template name="SubCatCell" /&gt;
          &lt;/xsl:for-each&gt;
        &lt;/div&gt;
      &lt;/xsl:if&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>I think it's dynamically producing the following:</p>
  
  <pre><code>&lt;div class="row"&gt;
     &lt;div class="cell"&gt;&lt;/div&gt;
     &lt;div class="cell"&gt;&lt;/div&gt;
     &lt;div class="cell"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need it to be 4 cells per row.  What do I need to change?</p>