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

Re: [XSL-FO] Re: selecting data for running headers

Expand Messages
  • Chris Bowditch
    ... This is straight forward to achieve using markers. Simply place all occurences of the element into a fo:marker with the same class name. Then the retrieve
    Message 1 of 9 , Jul 1 12:49 AM
    • 0 Attachment
      douglasoosterbaan wrote:

      > Thanks. I think my real challenge is knowing which instance of
      > the element to use in the running header. This element may occur
      > several times on a physically rendered page, however it is only
      > the content corresponding to the last occurence of this element
      > on a physical page that I need to put in the running header of
      > the next page. I don't have a good way to determine which
      > occurance of this element is that last one on a rendered
      > page, so I don't know which one to set a marker on. If I set
      > a different marker on all occurrences of this element, then I
      > still don't know which marker to select for my running header.

      This is straight forward to achieve using markers. Simply place all occurences
      of the element into a fo:marker with the same class name. Then the retrieve
      marker in static content of the next page should look like:

      <fo:retrieve-marker retrieve-class-name="amarker"
      retrieve-boundary="page-sequence" retrieve-position="last-starting-within-page"/>

      The last element on the previous page will be selected. We use this technique
      for running page totals without problem.

      <snip/>

      Chris
    • douglasoosterbaan
      Thanks a lot for your help. I ll give this a try. ... occurences ... retrieve ... within-page / ... technique
      Message 2 of 9 , Jul 1 8:06 AM
      • 0 Attachment
        Thanks a lot for your help. I'll give this a try.

        --- In XSL-FO@yahoogroups.com, Chris Bowditch <bowditch_chris@h...>
        wrote:
        > douglasoosterbaan wrote:
        >
        > > Thanks. I think my real challenge is knowing which instance of
        > > the element to use in the running header. This element may occur
        > > several times on a physically rendered page, however it is only
        > > the content corresponding to the last occurence of this element
        > > on a physical page that I need to put in the running header of
        > > the next page. I don't have a good way to determine which
        > > occurance of this element is that last one on a rendered
        > > page, so I don't know which one to set a marker on. If I set
        > > a different marker on all occurrences of this element, then I
        > > still don't know which marker to select for my running header.
        >
        > This is straight forward to achieve using markers. Simply place all
        occurences
        > of the element into a fo:marker with the same class name. Then the
        retrieve
        > marker in static content of the next page should look like:
        >
        > <fo:retrieve-marker retrieve-class-name="amarker"
        > retrieve-boundary="page-sequence" retrieve-position="last-starting-
        within-page"/>
        >
        > The last element on the previous page will be selected. We use this
        technique
        > for running page totals without problem.
        >
        > <snip/>
        >
        > Chris
      • Dave Pawson
        ... I m not sure I understand this Chris? That sounds like the running total will be from the last page, not this one? Or is it the first item on page (the
        Message 3 of 9 , Jul 1 9:09 AM
        • 0 Attachment
          At 08:49 01/07/2004, Chris Bowditch wrote:

          >This is straight forward to achieve using markers. Simply place all
          >occurences
          >of the element into a fo:marker with the same class name. Then the retrieve
          >marker in static content of the next page should look like:
          >
          ><fo:retrieve-marker retrieve-class-name="amarker"
          >retrieve-boundary="page-sequence"
          >retrieve-position="last-starting-within-page"/>
          >
          >The last element on the previous page will be selected. We use this technique
          >for running page totals without problem.

          I'm not sure I understand this Chris?
          That sounds like the running total will be from the last page,
          not this one?
          Or is it the 'first item on page' (the carried forward sum?)

          regards DaveP
        • J.Pietschmann
          ... A marker is always selected from the current page or a page before, never from a page after the current page. The FO will roughly look like this: table
          Message 4 of 9 , Jul 1 10:05 AM
          • 0 Attachment
            Dave Pawson wrote:
            > I'm not sure I understand this Chris?
            > That sounds like the running total will be from the last page,
            > not this one?

            Look carefully:
            >>retrieve-position="last-starting-within-page"/>

            A marker is always selected from the current page or a page before,
            never from a page after the current page.

            The FO will roughly look like this:
            table
            item 10 marker=10
            item 10 marker=20
            item 5 marker=25
            --- assume page break here ---
            item 20 marker=45
            ...
            The marker containing "25" is retrieved.

            J.Pietschmann
          • Dave Pawson
            ... And that was my problem, the 25 marker is not within-page Joerg? Hence it must be the carried forward figure, rather than the total this page
            Message 5 of 9 , Jul 1 11:08 AM
            • 0 Attachment
              At 18:05 01/07/2004, you wrote:

              >Look carefully:
              > >>retrieve-position="last-starting-within-page"/>
              >
              >A marker is always selected from the current page or a page before,
              >never from a page after the current page.
              >
              >The FO will roughly look like this:
              > table
              > item 10 marker=10
              > item 10 marker=20
              > item 5 marker=25
              > --- assume page break here ---
              > item 20 marker=45
              > ...
              >The marker containing "25" is retrieved.

              And that was my problem, the '25' marker is not 'within-page' Joerg?
              Hence it must be the 'carried forward' figure,
              rather than the 'total this page' figure.

              regards DaveP
            • J.Pietschmann
              ... Oh well, misunderstandings at large, sorry. I also misread The last element on the previous page will be selected. Of course, the code would select the
              Message 6 of 9 , Jul 1 1:20 PM
              • 0 Attachment
                Dave Pawson wrote:

                > At 18:05 01/07/2004, you wrote:
                >
                >
                >>Look carefully:
                >> >>retrieve-position="last-starting-within-page"/>
                >>
                >>A marker is always selected from the current page or a page before,
                >>never from a page after the current page.
                >>
                >>The FO will roughly look like this:
                >> table
                >> item 10 marker=10
                >> item 10 marker=20
                >> item 5 marker=25
                >> --- assume page break here ---
                >> item 20 marker=45
                >> ...
                >>The marker containing "25" is retrieved.
                >
                >
                > And that was my problem, the '25' marker is not 'within-page' Joerg?
                > Hence it must be the 'carried forward' figure,
                > rather than the 'total this page' figure.

                Oh well, misunderstandings at large, sorry. I also misread "The
                last element on the previous page will be selected." Of course, the
                code would select the last marker from the current page if there
                are matching markers there, not the previous page.
                I meant the '25' is retrieved on the page where the table starts,
                rather than the next page. If the value has to occur on the next page,
                the marker generator has to shift them one table row ahead, and
                retrival should use first-starting-within-page.

                Sorry for the confusion.

                J.Pietschmann
              Your message has been successfully submitted and would be delivered to recipients shortly.