[daisy] XSL-FO Table Header Problem

Marc Portier mpo at outerthought.org
Wed Jun 13 09:52:19 CDT 2007



Hofmann. David wrote:
> 
> 
> The concept code would be:
> 
> <xsl:template match="tr">
> 
>             <xsl:choose>
> 
>                         <xsl:when test="<!-- condition for: <tr> 
> contains one ore more <th> Tags -->">
> 

as Bruno answered the test="th" should do fine

however, looking at your template match this test will be applied to 
_all_ rows in the table that have a th in them, thus yielding more then 
one fo:table-header, possibly on lower rows then the first

talking about repeating the header, I would think you only want this 
test to be applied to the first row in the table, no?

to solve that test="th and .=../tr[1]" would do a better job
(or having a separate template for match="tr[1]" to deal with these 
table-headers)


thinkig further I'm afraid that reality is a bit worse though: often 
people add th cells in the first _column_ of html-tables rather then to 
the first row... even with the suggested fix you could end up with a 
repeated first row that people might NOT want to be repeated...

in the end I guess letting your editors adding a table/@class attribute 
is the only way to make proper distinction...


regards,
-marc=


More information about the daisy mailing list