[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Subtotals by page


Subject: Re: [xsl] Subtotals by page
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 14 Mar 2005 13:58:22 GMT

You haven't said what medium you are using for the final format.

if you are writing to html then (presumably) you are paginating within
the xslt (eg every 5 items) so could subtotal with the xslt but I
suspect that you are writing to some page formatter eg an XSL-FO system.
In that case you have some choices:

* paginate within the XSLT: this is easy enough if all your items are
  regular in size. If you have paragraph sized entries so you don't know
  the vertical size until after typesetting it isn't really feasible.

or

* don't paginate within xslt jut send a single stream of items to the FO
  engine. Hide the possible subtotals in fo:markers and pull out the
  correct subtoal in the static region in the footer (this isn't always
  feaible, it's easier for running totals weher you want the sum from
  the beginning of the table to the current page rather than the page
  total.


or

* I understand some FO engines have extension elements that let them
  write data to the filesystem while typesetting. If you have such an
  extension write infomation about between which items the page breaks
  occur to an xml file in any format of your choice. After typesetting
  the "first draft" re-run the xslt  but use document() to pull in the
  page break data so you can then add the page totals and re-typeset.

or ...

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


Current Thread
Keywords