Re: [xsl] Using a TableHeader Vs Using the Page header in XSL:FO

Subject: Re: [xsl] Using a TableHeader Vs Using the Page header in XSL:FO
From: Vasu Chakkera <vasucv@xxxxxxxxx>
Date: Mon, 24 Oct 2011 16:49:59 +0100
Great. Thanks both for your inputs..
Vasu

On 24 October 2011 13:25, Tony Graham <tgraham@xxxxxxxxxx> wrote:
> On Mon, October 24, 2011 12:17 pm, G. Ken Holman wrote:
>> At 2011-10-24 09:03 +0100, Vasu Chakkera wrote:
> ...
>>>May be some more.. I am not trying to clearely use the table header
>>>instead of the page header, but want to know if there are any
>>>performance benifits in the page header as opposed to the table
>
> In terms of faster processing, you'd probably need quite a large document
> to see much difference in processing time.  My untested inference would be
> that using fo:table-header would turn out to be slower and require more
> memory since the FO processor is more likely to hold on to more memory for
> the table for the duration of processing the page-sequence than it would
> need for making areas from the fo:region-before for each page.
>
>>>headers? And is there a situation where we can definitely not use a
>>>table header ..
>>
>> <page-number/> can only be rendered in <static-content> and not in <flow>.
>
> I don't see that. fo:page-number is defined as part of %inline; [1], and I
> don't see any text limiting it to fo:static-content.  Particular
> processors may, however, have that as a limitation.
>
> Whether, and to what extent, a particular XSL-FO processor re-evaluates
> the fo:table-header on each page could be another limitation.  The spec
> [2] says:
>
>   The content of the fo:table-header and fo:table-footer,
>   unless omitted as specified by the "table-omit-header-at-break"
>   and "table-omit-footer-at-break" properties, shall be repeated
>   for each normal block-area generated and returned by the
>   fo:table formatting object.
>
> but a naive implementation would just reuse the same areas from the first
> page.  Certainly a processor that implements fo:retrieve-table-marker
> should be expected to implement re-evaluating fo:table-header for each
> page.
>
>> I think that is the show-stopper.  Since XSL-FO 1.1 the two are
>> pretty similar in what they support because of the addition of table
>> markers.  There might be other nuances, but the one that jumped to
>> the top of mind was the page number.  What in this comparison is nice
>> about table headers is their variable height (regions have fixed heights).
>
> Table rows can have fixed height [3], and fo:region-before can have
> 'overflow="visible"' [4] if you want a variable height.
>
> One thing you will lose with fo:table-header is the ability to have
> different headers on first/last/odd/even/only pages.  If the most you
> would do between odd and even pages is swap the visible page number
> between the right and left sides, you _might_ be able to fake that using
> fo:float, but again you'd be skirting processor-specific limitations since
> it's not a common usage to put a fo:float inside a repeating
> fo:table-header.
>
> Regards,
>
>
>
> Tony Graham                                   tgraham@xxxxxxxxxx
> Consultant                                 http://www.mentea.net
> Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
>  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
>    XML, XSL FO and XSLT consulting, training and programming
>
> [1] http://www.w3.org/TR/xsl11/#d0e6532
> [2] http://www.w3.org/TR/xsl11/#fo_table
> [3] http://www.w3.org/TR/xsl11/#fo_table-row
> [4] http://www.w3.org/TR/xsl11/#overflow
>
>



--
Vasu Chakkera
NodeLogic Limited
Oxford
www.node-logic.com
==============

Current Thread