title: How to remove code duplication in template
body: <p>I have the following XSLT templates</p>
  <pre><code>&lt;xsl:template match=&quot;body/table/rows&quot;&gt;
        &lt;fo:table-row font-weight=&quot;bold&quot;&gt;
           &lt;fo:table-cell&gt;
              &lt;fo:block&gt;
                 &lt;xsl:value-of select=&quot;date&quot; /&gt;
              &lt;/fo:block&gt;
           &lt;/fo:table-cell&gt;
        ..............
        &lt;/fo:table-row&gt;
    &lt;/xsl:template&gt;
  
    &lt;xsl:template match=&quot;body/table/result&quot;&gt;
        &lt;fo:table-row&gt;
           &lt;fo:table-cell&gt;
              &lt;fo:block&gt;
                 &lt;xsl:value-of select=&quot;date&quot; /&gt;
              &lt;/fo:block&gt;
           &lt;/fo:table-cell&gt;
        ..............
        &lt;/fo:table-row&gt;
    &lt;/xsl:template&gt;
  </code></pre>
  <p>the difference in the templates is that for the element <code>&lt;fo:table-row&gt;</code> there is <code>font-weight=&quot;bold&quot;</code> and the other one doesn't have, however the content of both templates which is made of <code>&lt;fo:table-cell</code> is the same,clearly this is a code duplication. Is there a way to remove this code duplication?</p>