title: Converting xml/html table to pdf via xsl-fo
body: <p>I'm working on a xslt and xsl-fo code to convert to html and pdf respectively.</p>
  
  <p>In my source xml I have a table which I can copy directly for html output.</p>
  
  <pre><code>     &lt;text&gt;
          &lt;table border='1'&gt;
            &lt;thead&gt;
              &lt;tr&gt;&lt;th&gt;Problem&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Comments&lt;/th&gt;
              &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
              &lt;tr&gt;
                &lt;td&gt;Cholecystitis&lt;/td&gt;&lt;td&gt;9/28/2002 - 6/2003&lt;/td&gt;
                &lt;td&gt;Resolved&lt;/td&gt;
                &lt;td&gt;Surgery postponed until after delivery&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;td&gt;Pregnancy&lt;/td&gt;&lt;td&gt;7/2001 - 4/22/2002&lt;/td&gt;
                &lt;td&gt;Resolved&lt;/td&gt;
                &lt;td&gt;Prior history of miscarraige&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;&lt;td&gt;Ankle Sprain&lt;/td&gt;&lt;td&gt;3/28/2005&lt;/td&gt;
                &lt;td&gt;Current&lt;/td&gt;
                &lt;td&gt;Slipped on ice and fell&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/tbody&gt;
          &lt;/table&gt;
       &lt;/text&gt;
  </code></pre>
  
  <p>I just use this to copy the content for  node:</p>
  
  <pre><code>&lt;xsl:copy-of select="."/&gt;
  </code></pre>
  
  <p>I suppose this works for the xslt convertion to html since the browser can interpret this directly. But for my pdf I suppose I have to use xsl-fo which is completely different. I know in xsl-fo I have to use:</p>
  
  <pre><code>&lt;fo:table&gt;
  </code></pre>
  
  <p>But, is there a "standard" way to format this table to be able to use it for my pdf generation? The xsl:copy for the pdf produces a single line with all the stripped values but no table.</p>
  
  <p>Thank you!</p>
  
  <p>=====================================</p>
  
  <h1>EDIT</h1>
  
  <p>What I'm trying to do is to code some xslt to "parse" the table embeded in my source xml files to generate something like this:</p>
  
  <pre><code>&lt;fo:table  table-layout="fixed" width="100%"&gt;
      &lt;fo:table-column column-width="25mm"/&gt;
      &lt;fo:table-column column-width="25mm"/&gt;
      &lt;fo:table-body&gt;
          &lt;fo:table-row&gt;
              &lt;fo:table-cell&gt;
                  &lt;fo:block&gt;
  something
                  &lt;/fo:block&gt;
              &lt;/fo:table-cell&gt;
          &lt;/fo:table-row&gt;
          &lt;fo:table-row&gt;
              &lt;fo:table-cell&gt;
                  &lt;fo:block&gt;
  something
                  &lt;/fo:block&gt;
              &lt;/fo:table-cell&gt;
          &lt;/fo:table-row&gt;
      &lt;/fo:table-body&gt;
  &lt;/fo:table&gt;
  </code></pre>
  
  <p>Is it the way to go?! Tables are pretty standard, I thought html table could be easily transformed to xslt/xsl-fo.</p>