title: apache fop: remove empty table columns
body: <p><img src="https://i.stack.imgur.com/9v6la.png" alt="The Example"></p>
  
  <p>I'm trying to generate a table, where columns are added or removed dynamically, depeindig on user input. 
  Problem is, that the empty columns are still visible (see the Picture)</p>
  
  <p>My current approach is using xsl:if. (see the code snippet)</p>
  
  <pre><code>&lt;fo:table table-layout="fixed" width="100%" font-family="Helvetica" font-size="12pt"&gt;
                          &lt;fo:table-body start-indent="5pt"&gt;
                              &lt;fo:table-row&gt;
                                  &lt;fo:table-cell&gt;
                                      &lt;fo:block&gt;
                                      &lt;xsl:if test="boolean(./targetAgreements/targetAgreement/area/@visible = 'true')"&gt;
                                          Area
                                          &lt;/xsl:if&gt;
                                      &lt;/fo:block&gt;
                                  &lt;/fo:table-cell&gt;
                                  &lt;fo:table-cell&gt;
                                      &lt;fo:block&gt;
                                      &lt;xsl:if test="boolean(./targetAgreements/targetAgreement/brand/@visible = 'true')"&gt;
                                          Brand
                                          &lt;/xsl:if&gt;
                                      &lt;/fo:block&gt;
                                  &lt;/fo:table-cell&gt;
                                  &lt;fo:table-cell&gt;
                                      &lt;fo:block&gt;
                                       &lt;xsl:if test="boolean(./targetAgreements/targetAgreement/currentTarget/@visible = 'true')"&gt;
                                          Current Target
                                          &lt;/xsl:if&gt;
                                      &lt;/fo:block&gt;
                                  &lt;/fo:table-cell&gt;
                                  &lt;fo:table-cell&gt;
  ...
  </code></pre>
  
  <p>If I try to surround the table-cell with the xsl:if it tells me, that table-row requires at least one table-cell as a child element.</p>
  
  <p>How can I remove the empty columns completely?</p>
  
  <p>Thanks!!</p>