[daisy] XSL-FO Table Header Problem
Marc Portier
mpo at outerthought.org
Wed Jun 13 14:41:13 CDT 2007
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[*]"
of course, this is getting really pure xpath/xslt related...
Just to be sure you get the best advice in this I should mention there
are far more dedicated mailing-lists/forums for that subject then this
one...
HTH,
-marc=
More information about the daisy
mailing list