[daisy] XSL-FO Table Header Problem

Bruno Dumon bruno at outerthought.org
Thu Jun 14 03:13:56 CDT 2007


On Wed, 2007-06-13 at 21:41 +0200, Marc Portier wrote:
> 
> Hofmann. David wrote:
> > 
> > Thank you for your support, the table headers are now repeated
> > automatically.
> > 
> 
> cool
> 
> > I also knew that this would not be the final solution, because there are
> > some exceptions, as mark pointed out very well.
> > 
> > What do you think of the condition "it is the first table row and
> > contains <th>s ONLY" is there a XSL-FO expression for that?
> 
> of course, should off thought that one out myself...
> as for xpath expressions for testing:
> 
> * "am I the first row" test was already mentioned:
>    >> ".=../tr[1]"
>       (this node same as first tr node of my parent)
> 
> you can 'and' that with one of:
> 
> 
> * "does this row hold only th" test:
>    -- "count(*[not(local-name()='th')]) = 0"
>       (count of all elements with other name then 'th' = 0)
> 
>    or depending on your preference:
>    -- "not(*[not(local-name()='th')])"
>       (omit the count, there simply are no such elements...)
> 
> * given the confusing double negation in the above
>    it might be easier to just test for "absence of td":
>    -- "not(td)"
>       (there are no td's)
> 
>    this could falsely match empty <tr/> (meaningless, but still)
>    those could be excluded at the template/@match  with "tr[*]"

Or just use "th and not(td)"

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list