Loading ...
Sorry, an error occurred while loading the content.
 

Re: Formatting based on new page

Expand Messages
  • Maxim
    ... Well, I m trying to format the first row of a page differently from the last. I guess I ll just move on. But what would you do if you need to number rows
    Message 1 of 4 , Jul 11, 2006
      --- In XSL-FO@yahoogroups.com, "G. Ken Holman" <gkholman@...> wrote:
      >
      > At 2006-07-11 15:47 +0000, Maxim wrote:
      > >I have an interesting question. I am working on an FO report that
      > >lists multiple rows of data. What I need to do is to make the first
      > >row of data on every page use different formatting from the rest of
      > >the rows on that page. The problem is, how can I make FO tags aware
      > >that a new page has been started? (I'm trying to do this for the table
      > >data itself, not table headers.) Basically in pseudo:
      > >if (new page)
      > > use formatting A to print new row
      > >else if (same page)
      > > use formatting B to print new row
      >
      > The arms-length relationship between
      > transformation (typically XSLT) and formatting
      > prevents such a logic question to be posed in your stylesheet.
      >
      > XSL-FO works on contingencies: you add
      > contingencies to your XSL-FO objects that are
      > triggered by the condition being sensed by the
      > formatting engine for those objects.
      >
      > I doubt that XSL-FO will have the contingencies
      > you need for "a row of data", but you haven't
      > described what it is you want to be different at
      > the top of each page. Can you give us more detail?
      >
      > . . . . . . . Ken
      >
      >
      > --
      > Registration open for UBL training: Montréal, Canada 2006-08-07
      > Also for XSL-FO/XSLT training: Minneapolis, MN 2006-07-31/08-04
      > Also for UBL/XML/XSLT/XSL-FO training: Varo,Denmark 06-09-25/10-06
      > World-wide corporate, govt. & user group UBL, XSL, & XML training.
      > G. Ken Holman mailto:gkholman@...
      > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      > Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      > Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
      > Legal business disclaimers: http://www.CraneSoftwrights.com/legal
      >

      Well, I'm trying to format the first row of a page differently from
      the last. I guess I'll just move on. But what would you do if you need
      to number rows on the page, restarting the count on each page?
    • G. Ken Holman
      ... You already said that ... I asked what difference you wanted in the formatting. ... That cannot be done in XSL-FO ... there is no semantic in XSL-FO
      Message 2 of 4 , Jul 11, 2006
        At 2006-07-11 18:51 +0000, Maxim wrote:
        >Well, I'm trying to format the first row of a page differently from
        >the last.

        You already said that ... I asked what difference you wanted in the formatting.

        >I guess I'll just move on. But what would you do if you need
        >to number rows on the page, restarting the count on each page?

        That cannot be done in XSL-FO ... there is no
        semantic in XSL-FO representing a counter at the
        beginning of a new page. That's why you cannot
        do page-based footnote citations either.

        If you can calculate row heights and you know
        page size then you can use XSLT at transformation
        time to apportion different rows to different
        pages and number from there. But if you are
        looking for a trigger that restarts when the page
        breaks in a bunch of rows (which only the
        formatter knows, not the transformation process),
        that semantic is not available in XSL-FO.

        . . . . . . . . . . . . . Ken

        --
        Registration open for UBL training: Montréal, Canada 2006-08-07
        Also for XSL-FO/XSLT training: Minneapolis, MN 2006-07-31/08-04
        Also for UBL/XML/XSLT/XSL-FO training: Varo,Denmark 06-09-25/10-06
        World-wide corporate, govt. & user group UBL, XSL, & XML training.
        G. Ken Holman mailto:gkholman@...
        Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
        Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
        Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
        Legal business disclaimers: http://www.CraneSoftwrights.com/legal
      Your message has been successfully submitted and would be delivered to recipients shortly.