Author: crossley
Date: Sat Mar  1 21:46:17 2008
New Revision: 632714

URL: http://svn.apache.org/viewvc?rev=632714&view=rev
Log:
Fix handling of table-header and table-row to enable optional th in rows and 
allow missing table header.
Issue: FOR-1072

Modified:
    
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl

Modified: 
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
URL: 
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl?rev=632714&r1=632713&r2=632714&view=diff
==============================================================================
--- 
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
 (original)
+++ 
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
 Sat Mar  1 21:46:17 2008
@@ -444,13 +444,13 @@
       </fo:table-column>
       <!-- End of hack for Fop support (if removing this hack, remember
       you need the <fo:table> element) -->
-      <xsl:if test="tr[count(th) &gt; 0]">
+      <xsl:if test="tr[count(th) &gt; 0 and count(td) = 0]">
         <fo:table-header font-size="10pt" font-family="serif">
-          <xsl:apply-templates select="tr[count(th) &gt; 0]"/>
+          <xsl:apply-templates select="tr[count(th) &gt; 0 and count(td) = 
0]"/>
         </fo:table-header>
       </xsl:if>
       <fo:table-body font-size="10pt" font-family="serif">
-        <xsl:apply-templates select="tr[count(th) = 0]"/>
+        <xsl:apply-templates select="tr[count(td) &gt; 0]"/>
       </fo:table-body>
     </fo:table>
     <!-- FIXME: Apache Fop does not support the caption element yet.